new Helper(node, context)
Abstract class for UI Helpers.
Designed to be used as a helper method for the included WebComponents. A full tutorial on how to work with and customize the web components can be found here: Web Component Interface
Parameters:
Name | Type | Description |
---|---|---|
node |
HTMLElement | DOM node. |
context |
CIQ.UI.Context | UIContext the helper is associated with |
Methods
-
addInjection(position, injection, code)
-
Adds an injection. These will be automatically destroyed if the helper object is destroyed.
Designed to be used as a helper method for the included WebComponents. A full tutorial on how to work with and customize the web components can be found here: Web Component Interface
Parameters:
Name Type Description position
String "prepend" or "append"
injection
String The injection name. i.e. "draw"
code
function The code to be run
-
addObserver(params)
-
Adds listener as an observer and saves it in the list allowing it to reconnect to a different observable.
Designed to be used as a helper method for the included WebComponents. A full tutorial on how to work with and customize the web components can be found here: Web Component Interface
Parameters:
Name Type Description params
object Object holding parameter properties
Properties
Name Type Description node
HTMLElement Node that owns the observer
base
object Observable object
path
string Path to the property to observe
listener
function The function to invoke when the property changes
- Since:
-
- 8.4.0
- 8.8.0 Added parameter
node
.
-
changeContext(newContext)
-
Changes helper context updates references and listeners
Designed to be used as a helper method for the included WebComponents. A full tutorial on how to work with and customize the web components can be found here: Web Component Interface
Parameters:
Name Type Description newContext
object The new context for the helper
- Since:
-
8.4.0
-
destroy()
-
Removes injections from the ChartEngine and helper created observers
Designed to be used as a helper method for the included WebComponents. A full tutorial on how to work with and customize the web components can be found here: Web Component Interface
-
removeObservers(node)
-
Removes all observers from a node that were added with CIQ.UI.Helper#addObservable.
Parameters:
Name Type Description node
HTMLElement Node that owns the observer(s)
- Since:
-
8.8.0