SwipeViewModel

require(["esri/widgets/Swipe/SwipeViewModel"], function(SwipeViewModel) { /* code goes here */ });
Class: esri/widgets/Swipe/SwipeViewModel
Inheritance: SwipeViewModel Accessor
Since: ArcGIS API for JavaScript 4.13

Provides the logic for the Swipe widget.

See also:

Constructors

new SwipeViewModel(properties)
Parameter:
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Property Overview

Any properties can be set, retrieved or listened to. See the Working with Properties topic.
NameTypeSummaryClass
String

The name of the class.

more details
more detailsAccessor
String

The direction the Swipe widget moves across the view.

more details
more detailsSwipeViewModel
Collection<Layer>

A collection of Layers that will show on the left or top side of Swipe widget.

more details
more detailsSwipeViewModel
Number

The position of the Swipe widget.

more details
more detailsSwipeViewModel
String

The current state of the widget.

more details
more detailsSwipeViewModel
Collection<Layer>

A collection of Layers that will show on the right or bottom side of Swipe widget.

more details
more detailsSwipeViewModel
MapView

A reference to the MapView.

more details
more detailsSwipeViewModel

Property Details

declaredClass Stringreadonly inherited

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.

horizontalvertical
widgets-swipe-horizontalwidgets-swipe-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:
view MapView

A reference to the MapView. Set this to link the widget to a specific view.

API Reference search results

NameTypeModule
Loading...