Skip to content
import VisibleElements from "@arcgis/core/widgets/Sketch/VisibleElements.js";
Inheritance:
VisibleElementsAccessor
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 tools
sketch.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 tools
sketch.visibleElements = {
undoRedoMenu: false
}

Constructors

Constructor

Constructor
Parameters
ParameterTypeDescriptionRequired
properties
See the properties table for a list of all the properties that may be passed into the constructor.

Properties

Any properties can be set, retrieved or listened to. See the Watch for changes topic.

createTools

autocast Property
Type
CreateToolVisibilityMap

The available sketch tools within the widget.

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor
Since
ArcGIS Maps SDK for JavaScript 4.7

The name of the class. The declared class name is formatted as esri.folder.className.

deleteButton

Property
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

Property
Type
boolean

Indicates whether to display the 'duplicate' button while a graphic is selected. Default is true.

Default value
true

labelsToggle

Property
Type
boolean

Indicates whether to display the sketch labels toggle. Default value is true.

Default value
true

selectionCountLabel

Property
Type
boolean

Indicates whether to display a label indicating the length of the currently selected feature set.

Default value
true

selectionTools

autocast Property
Type
SelectionToolVisibilityMap

The available selection tools within the widget.

Known Limitation

Rectangle and lasso selection is only supported when working with a MapView.

settingsMenu

Property
Type
boolean

Indicates whether to display the settings menu. Currently this menu contains snapping options. Default value is true.

Default value
true

snappingControls

Property
Type
boolean

Indicates whether to display the SnappingControls widget. Default is true.

Default value
true

snappingControlsElements

autocast Property
Type
SnappingControlsVisibleElements

The available SnappingControls elements within the widget.

tooltipsToggle

Property
Type
boolean

Indicates whether to display the tooltips toggle. Default value is true.

Default value
true

undoRedoMenu

Property
Type
boolean

Indicates whether to display the undo/redo menu within the widget. Default is true.

Default value
true