Script class of the Multi-Site views (map/table grid/graph).
Method | Description |
callListener(eventName, [args])
| Calls all event listeners for the given event name, useful for testing. |
getViewProperties()
| Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view. |
getViewProperty(id)
| Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view. |
on(eventName, callback)
| Adds an event listener for the given event name. e.g. view.on("click", function() { ... }); |
removeAllListeners([eventName])
| Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed. |
removeListener(eventName, callback)
| Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback); |
setViewProperty(id, value)
| Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view. |
resetLogMapCapture()
| Resets Log Map capturing (if supported). This sets all the site weights in the log map to zero. |
showCorrectionsDialog()
| Shows the corrections dialog (if supported) |