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 whether the widget is enabled.

setEnabled(enabled)

Sets whether the widget is enabled.

Minimap

getIconsEnabled()

Returns whether icons in the widget are enabled.

setIconsEnabled(enabled)

Sets whether icons in the widget are enabled.

North Indicator

getInteractionEnabled()

Returns whether north indicator interaction is enabled.

setInteractionEnabled(enabled)

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])

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.