Skip to content
import VisibleElements from "@arcgis/core/widgets/support/GridControls/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 toggle visibility for individual elements within the widget.

Example
// This removes the `dynamicScaleToggle` and `gridEnabledToggle`
gridControls.visibleElements = {
dynamicScaleToggle: false,
gridEnabledToggle: 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.

colorSelection

Property
Type
boolean

Indicates whether to display the buttons to change the color of the grid. Default is true. This controls the GridControlsViewModel.gridColor.

Default value
true

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.

dynamicScaleToggle

Property
Type
boolean

Indicates whether to display the dynamicScaleToggle. Default is true. This toggles the GridControlsViewModel.dynamicScaling property.

Default value
true

gridEnabledToggle

Property
Type
boolean

Indicates whether to display the gridEnabledToggle. Default is true. This enables / disables the grid.

Default value
true

gridSnapEnabledToggle

Property
Type
boolean

Indicates whether to display the gridSnapEnabledToggle. This enables / disables snapping to the grid.

Default value
true

lineIntervalInput

Property
Type
boolean

Indicates whether to display the lineIntervalInput. Default is true. This defines the GridControlsViewModel.majorLineInterval, which controls the number of grid lines between opaque grid lines.

Default value
true

numericInputs

Property
Type
boolean

Indicates whether to display the numericInputs. Default is true. Defines the spacing in between grid lattices and the angle.

Default value
true

outOfScaleWarning

Property
Type
boolean

Indicates whether to display a notice when the grid is not visible because it is out of scale and dynamic scaling is turned off. Default is true.

Default value
true

placementButtons

Property
Type
boolean

Indicates whether to display placementButtons. Default is true. The buttons allow for placing, moving, and rotating the grid.

Default value
true

rotateWithMapToggle

Property
Type
boolean

Indicates whether to display the rotateWithMapToggle. Default is true. This toggles the GridControlsViewModel.rotateWithMap property. When true, rotating the map also rotates the grid on screen.

Default value
true