SwipeViewModel
require(["esri/widgets/Swipe/SwipeViewModel"], function(SwipeViewModel) { /* code goes here */ });
esri/widgets/Swipe/SwipeViewModel
Provides the logic for the Swipe widget.
Constructors
- new SwipeViewModel(properties)
- Parameter:properties Objectoptional
See the properties for a list of all the properties that may be passed into the constructor.
Property Overview
Name | Type | Summary | Class | |
---|---|---|---|---|
String | The name of the class. more details | more details | Accessor | |
String | The direction the Swipe widget moves across the view. more details | more details | SwipeViewModel | |
Collection<Layer> | A collection of Layers that will show on the left or top side of Swipe widget. more details | more details | SwipeViewModel | |
Number | The position of the Swipe widget. more details | more details | SwipeViewModel | |
String | The current state of the widget. more details | more details | SwipeViewModel | |
Collection<Layer> | A collection of Layers that will show on the right or bottom side of Swipe widget. more details | more details | SwipeViewModel | |
MapView | A reference to the MapView. more details | more details | SwipeViewModel |
Property Details
The name of the class. The declared class name is formatted as
esri.folder.className
.
- direction String
The direction the Swipe widget moves across the view. If
"horizontal"
, the widget will move left and right and if"vertical"
, the widget will move up and down.horizontal vertical Possible Values:"horizontal"|"vertical"
- Default Value:"horizontal"
- leadingLayers Collection<Layer>autocast
A collection of Layers that will show on the left or top side of Swipe widget. See the image in the Swipe class description. Currently, all layers are supported except GroupLayers.
- See also:
- position Number
The position of the Swipe widget. This determines what percentage of the view will be taken up by the leadingLayers.
- Default Value:25
- state Stringreadonly
The current state of the widget.
Possible Values:"disabled"|"ready"
- Default Value:disabled
- trailingLayers Collection<Layer>autocast
A collection of Layers that will show on the right or bottom side of Swipe widget. See the image in the Swipe class description. Currently, all layers are supported except GroupLayers.
- See also: