Widget
Widget instances are generated by the Viewer to allow you to control whether on-screen widgets are enabled or disabled.
You cannot directly create Widget instances.
getEnabled()
- Returns: <boolean>
Returns whether the widget is enabled.
setEnabled(enabled)
enabled
: <boolean>
Sets whether the widget is enabled.
Minimap
getIconsEnabled()
- Returns: <boolean>
Returns whether icons in the widget are enabled.
setIconsEnabled(enabled)
enabled
: <boolean>
Sets whether icons in the widget are enabled.
North Indicator
getInteractionEnabled()
- Returns: <boolean>
Returns whether north indicator interaction is enabled.
setInteractionEnabled(enabled)
enabled
: <boolean>
Sets whether north indicator interaction is enabled.
Plan Name Indicator
setName(name)
Sets the display text of the plan name indicator.
Status Indicator
By default has an appearance of type spinner
, message Loading...
, and no action.
setAppearance(type, message)
Sets the appearance of the status indicator.
Type must be either spinner
or error
.
setAction(action[, onAction])
action
: <string> | <null>onAction
: <Function>
Shows a button with the action
text. Clicking the button will call the onAction
callback.
Call setAction(null)
to remove the action.
reset()
Sets the status indicator to its default state.