ActionButton
require(["esri/support/actions/ActionButton"], function(ActionButton) { /* code goes here */ });
esri/support/actions/ActionButton
- See also:
Constructors
- new ActionButton(properties)
- Parameter:properties Objectoptional
See the properties for a list of all the properties that may be passed into the constructor.
Property Overview
Name | Type | Summary | Class | |
---|---|---|---|---|
Boolean | Indicates whether the action is currently active. more details | more details | ActionButton | |
String | Adds a CSS class to the action's node. more details | more details | ActionButton | |
Boolean | Indicates whether this action is disabled. more details | more details | ActionButton | |
String | The name of the ID assigned to this action. more details | more details | ActionButton | |
String | The URL to an image that will be used to represent the action. more details | more details | ActionButton | |
String | The title of the action. more details | more details | ActionButton | |
String | Specifies the type of action. more details | more details | ActionButton | |
Boolean | Indicates if the action is visible. more details | more details | ActionButton |
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 withesri-
. For example, the defaultzoom-to
action in Popup uses the fontesri-icon-zoom-in-magnifying-glass
.
- disabled Boolean
Indicates whether this action is disabled.
- Default Value:false
- id String
The name of the ID assigned to this action. This is used for differentiating actions when listening to the trigger-action event.
- image String
The URL to an image that will be used to represent the action. This property will be used as a background image for the node. It may be used in conjunction with the
className
property or by itself. If neitherimage
norclassName
are specified, a default iconwill display.
- 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
Name | Return Type | Summary | Class | |
---|---|---|---|---|
ActionButton | Creates a deep clone of this object. more details | more details | ActionButton |
Method Details
- clone(){ActionButton}
Creates a deep clone of this object.
Returns:Type Description ActionButton A clone of the new ActionButton instance.