Skip To ContentArcGIS for DevelopersSign In Dashboard
require(["esri/support/actions/ActionToggle"], function(ActionToggle) { /* code goes here */ });
Class: esri/support/actions/ActionToggle
Since: ArcGIS API for JavaScript 4.8

Actions used in Popup and LayerList. Use this when working with actions you wish to display as a toggle.

See also:

Constructors

new ActionToggle(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
Boolean

Indicates whether the action is currently active.

more details
more detailsActionToggle
String

Adds a CSS class to the action's node.

more details
more detailsActionToggle
Boolean

Indicates whether this action is disabled.

more details
more detailsActionToggle
String

The name of the ID assigned to this action.

more details
more detailsActionToggle
String

The title of the action.

more details
more detailsActionToggle
String

Specifies the type of action.

more details
more detailsActionToggle
Boolean

Indicates if the action is visible.

more details
more detailsActionToggle

Property Details

active Boolean

Indicates whether the action is currently active.

Default Value:false
className String

Adds a CSS class to the action's node. Can be used in conjunction with the image property or by itself. Any icon font may be used in this property. The Esri Icon Font is automatically made available via the ArcGIS API for JavaScript for you to use in styling custom actions. To use one of these provided icon fonts, you must prefix the class name with esri-. For example, the default zoom-to action in Popup uses the font esri-icon-zoom-in-magnifying-glass.

disabled Boolean

Indicates whether this action is disabled.

Default Value:false

The name of the ID assigned to this action. This is used for differentiating actions when listening to the trigger-action event.

title String

The title of the action.

For popups: When there are fewer than three actions defined in a popup, this text is displayed to the right of the icon or image representing the action. If there are three or more actions in the popup, then this text is used as a tooltip on the action.

For LayerList: The first action is displayed in the layerlist with an icon. The layerlist has a menu that will display all actions with their titles

type String

Specifies the type of action. Choose between "button" or "toggle". Currently, these two are the only supported types. A "slider" type will follow-up in a future release.

Default Value:null
visible Boolean

Indicates if the action is visible.

Default Value:true

Method Overview

NameReturn TypeSummaryClass
ActionToggle

Creates a deep clone of this object.

more details
more detailsActionToggle

Method Details

clone(){ActionToggle}

Creates a deep clone of this object.

Returns:
TypeDescription
ActionToggleA clone of the new ActionToggle instance.

API Reference search results

NameTypeModule
Loading...