SwipeViewModel

AMD: require(["esri/widgets/Swipe/SwipeViewModel"], (SwipeViewModel) => { /* code goes here */ });
ESM: import SwipeViewModel from "@arcgis/core/widgets/Swipe/SwipeViewModel";
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.
Show inherited properties Hide inherited properties
Name Type Summary Class
Stringmore details

The name of the class.

more detailsAccessor
Stringmore details

The direction the Swipe widget moves across the view.

more detailsSwipeViewModel
Collection<Layer>more details

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

more detailsSwipeViewModel
Numbermore details

The position of the Swipe widget.

more detailsSwipeViewModel
Stringmore details

The current state of the widget.

more detailsSwipeViewModel
Collection<Layer>more details

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

more detailsSwipeViewModel
MapViewmore details

A reference to the MapView.

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.

horizontal vertical
widgets-swipe-horizontal widgets-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.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.