▾
import VisibleElements from "@arcgis/core/widgets/Sketch/VisibleElements.js";const VisibleElements = await $arcgis.import("@arcgis/core/widgets/Sketch/VisibleElements.js");- Inheritance
- VisibleElements→
Accessor
- Since
- ArcGIS Maps SDK for JavaScript 5.0
The visible elements that are displayed within the widget. This provides the ability to turn individual elements of the widget's display on/off.
- Examples
- // This hides the lasso selection toolssketch.visibleElements = {selectionTools: {"lasso-selection": false}}// This removes the feature enabled snapping toggle and the layerlist.sketch.visibleElements = {snappingControlsElements: {featureEnabledToggle: false,layerList: false}}// This hides the undo/redo toolssketch.visibleElements = {undoRedoMenu: false}
Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
| Property | Type | Class |
|---|---|---|
| | ||
| readonly inherited | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| |
createTools
The available sketch tools within the widget.
deleteButton
- Type
- boolean
Indicates whether to display the 'delete' button while a graphic is selected. Default is true. Do not hide this button without giving users on touch devices another way to delete selected geometries.
- Default value
- true
duplicateButton
- Type
- boolean
Indicates whether to display the 'duplicate' button while a graphic is selected. Default is true.
- Default value
- true
geometrySimplificationActivityIndicator
- Type
- boolean
- Since
- ArcGIS Maps SDK for JavaScript 5.1
Indicates whether to display the geometry simplification progress indicator while geometry simplification is in progress.
Default value is true.
When set to false, the progress indicator is not shown. You can use
SketchViewModel.geometrySimplificationInProgress to detect this state and implement
alternative UI.
Before 5.1, simplification of geometries was done synchronously on the main thread. With the introduction of support for true curves, this simplification step can take some time (multiple seconds) in extreme cases. At 5.1, simplification is asynchronous and Sketch is disabled during simplification. If this process takes a significant amount of time, an activity indicator is shown. This property only affects rendering of that indicator.
- Default value
- true
labelsToggle
- Type
- boolean
Indicates whether to display the sketch labels toggle. Default value is true.
- Default value
- true
selectionCountLabel
- Type
- boolean
Indicates whether to display a label indicating the length of the currently selected feature set.
- Default value
- true
selectionTools
The available selection tools within the widget.
settingsMenu
- Type
- boolean
Indicates whether to display the settings menu. Currently this menu contains snapping options. Default value is true.
- Default value
- true
singlePluginBackButton
- Type
- boolean
- Since
- ArcGIS Maps SDK for JavaScript 5.1
Indicates whether to display a back button on the segment drawing toolbar when there is only one createTool available.
- Default value
- true
snappingControls
- Type
- boolean
Indicates whether to display the SnappingControls widget. Default is true.
This property is preserved but ignored while Sketch.useViewOptions is true.
- Default value
- true
snappingControlsElements
The available SnappingControls elements within the widget.
These visibility properties are preserved but ignored while Sketch.useViewOptions is true.
tooltipsToggle
- Type
- boolean
Indicates whether to display the tooltips toggle. Default value is true.
This property is preserved but ignored while Sketch.useViewOptions is true.
- Default value
- true
undoRedoMenu
- Type
- boolean
Indicates whether to display the undo/redo menu within the widget. Default is true.
- Default value
- true