import ExpandViewModel from "@arcgis/core/widgets/Expand/ExpandViewModel.js";const ExpandViewModel = await $arcgis.import("@arcgis/core/widgets/Expand/ExpandViewModel.js");- Inheritance:
- ExpandViewModel→
Accessor
- Since
- ArcGIS Maps SDK for JavaScript 4.3
Provides the logic for the Expand widget and component.
- See also
Expand widget - Deprecated since 4.34. Use the Expand component instead.
Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
| Property | Type | Class |
|---|---|---|
| | ||
declaredClass readonly inherited | ||
| | ||
| | ||
state readonly | | |
| |
autoCollapse
- Type
- boolean
Automatically collapses the Expand instance when the view's
viewpoint updates.
- Default value
- false
expanded
- Type
- boolean
Whether the element is currently expanded or not.
- Default value
- false
group
- 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