Skip to content
We're currently creating a lot of content. Sign up to get notified when it's ready.

UI

The UI API lets you interact with the Qatium UI.

sendMessage()

Allows the plugin to communicate with its UI panel.

Method signature

sendMessage<T>(message: T): void
Parameters
  • message: T: an arbitrary message to be sent to the UI. Check the documentation of structuredClone to verify what can be sent.

Example

Send a message to the UI panel

const numOfValves = sdk.network.getValves().length
sdk.ui.sendMessage(numOfValves)

isMapView()

Returns true if map view mode is active, or false if it isn’t.

isSynopticView()

Returns true if synoptic view mode is active, or false if it isn’t.

isPanelOpen()

Returns true is the plugin’s panel is open, or false if it isn’t.

openPanel()

Opens the plugin’s panel.

closePanel()

Closes the plugin’s panel.

isPluginVisible()

Returns true if the plugin’s overlay is visible, or false if it isn’t.