Skip to content
import ExpandViewModel from "@arcgis/core/widgets/Expand/ExpandViewModel.js";
Inheritance:
ExpandViewModelAccessor
Since
ArcGIS Maps SDK for JavaScript 4.3

Provides the logic for the Expand widget and component.

See also

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.

autoCollapse

Property
Type
boolean

Automatically collapses the Expand instance when the view's viewpoint updates.

Default value
false

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.

expanded

Property
Type
boolean

Whether the element is currently expanded or not.

Default value
false

group

Property
Type
string | null | undefined
Since
ArcGIS Maps SDK for JavaScript 4.6

This value associates two or more Expand instances with each other, allowing one instance to auto collapse when another instance in the same group is expanded. For auto collapsing to take effect, all instances of the group must be included in the view's ui property.

For example, if you place multiple Expand instances in the top-left of the view's ui, you can assign them to a group called top-left. If one Expand instance is expanded and the user clicks on a different instance in the top-left group, then the first instance is collapsed, allowing the content of the second instance to be fully visible.

See also

state

readonly Property
Type
ExpandViewModelState

The view model's state.

Default value
"disabled"

view

Property
Type
MapViewOrSceneView | null | undefined

The view in which the Expand is used.

Type definitions

ExpandViewModelState

Type definition
Type
"ready" | "disabled"