This class is used to facilitate creation and management of buttons that are displayed in the UI. Controls may be activated and deactivated by direct calls if necessary. But this class simplifies the process by associating one or more controls with a single button, which will automatically activate them when clicked, and can also support toggling of activation state for 'sticky' buttons.
Methods
The constructor takes an options object that supports the following properties:
|
map |
The associated mobileViewer.Map object |
|
activeControls |
An array of controls to activate when the button is clicked |
|
imageSrc |
The icon to be used for the button UI - the button shape and background are controlled by CSS, and the icon is overlaid on top of this standardized button style. |
|
buttonId |
The id to use for the generated button div element |
|
label |
The label to display for the button |
|
exclusive |
If the button is flagged as exclusive, all other controls will be deactivated whenever the controls associated with this button are activated |