UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

122 lines (120 loc) 4.36 kB
import type Accessor from "../../core/Accessor.js"; import type SnappingControlsVisibleElements from "../support/SnappingControls/VisibleElements.js"; import type { SnappingControlsVisibleElementsProperties } from "../support/SnappingControls/VisibleElements.js"; /** @since 5.0 */ export interface VisibleElementsProperties extends Partial<Pick<VisibleElements, "createFeaturesSection" | "editFeaturesSection" | "flow" | "labelsToggle" | "mergeButton" | "settingsMenu" | "sketch" | "snappingControls" | "splitButton" | "tooltipsToggle" | "undoRedoButtons" | "zoomToButton">> { /** * The available [SnappingControls](https://developers.arcgis.com/javascript/latest/references/core/widgets/support/SnappingControls/) elements within the widget. * * @since 5.0 */ snappingControlsElements?: SnappingControlsVisibleElementsProperties; } /** * The visible elements that are displayed within the widget. * This provides the ability to turn individual elements of the widget's display on/off. * * @since 5.0 * @example * // This removes the feature enabled snapping toggle and the layerlist. * editor.visibleElements = { * snappingControlsElements: { * featureEnabledToggle: false, * layerList: false * } * } */ export default class VisibleElements extends Accessor { constructor(properties?: VisibleElementsProperties); /** * Indicates whether to display the "create features" section of the widget in the default view. * * @default true * @since 5.0 */ accessor createFeaturesSection: boolean; /** * Indicates whether to display the "edit features" section of the widget in the default view. * * @default true * @since 5.0 */ accessor editFeaturesSection: boolean; /** * Determines whether the widget should be shown within its built-in [flow component](https://developers.arcgis.com/calcite-design-system/components/flow/) or if the flow component should be excluded. The widget will be displayed within its original flow component if set to `true`. The flow component will be omitted from the widget if set to `false`. To place the widget into an existing Calcite flow component, set this property to `false`. * * @default true * @since 5.0 */ accessor flow: boolean; /** * Indicates whether to display the sketch labels toggle. Default value is `true`. * * @default true * @since 5.0 */ accessor labelsToggle: boolean; /** * Indicates whether to display the "Merge features" button in contexts where that command is available. Default value is `true`. * * @default true * @since 5.0 */ accessor mergeButton: boolean; /** * Indicates whether to display the settings menu. This menu contains the snapping and tooltips settings. * * @default true * @since 5.0 */ accessor settingsMenu: boolean; /** * Determines whether the widget should display an embedded Sketch widget to provide graphical controls for choosing drawing tools. * * @default true * @since 5.0 */ accessor sketch: boolean; /** * Indicates whether to display the `SnappingControls` widget. Default is `true`. * * @default true * @since 5.0 */ accessor snappingControls: boolean; /** * The available [SnappingControls](https://developers.arcgis.com/javascript/latest/references/core/widgets/support/SnappingControls/) elements within the widget. * * @since 5.0 */ get snappingControlsElements(): SnappingControlsVisibleElements; set snappingControlsElements(value: SnappingControlsVisibleElementsProperties); /** * Indicates whether to display the "Split" button in contexts where that command is available. Default value is `true`. * * @default true * @since 5.0 */ accessor splitButton: boolean; /** * Indicates whether to display the tooltips toggle. Default value is `true`. * * @default true * @since 5.0 */ accessor tooltipsToggle: boolean; /** * Indicates whether to display undo/redo buttons in the embedded Sketch toolbar. Default value is `true`. * * @default true * @since 5.0 */ accessor undoRedoButtons: boolean; /** * Indicates whether to display the "Zoom to" button when creating and editing features. Default value is `true`. * * @default true * @since 5.0 */ accessor zoomToButton: boolean; }