BehaviorManager
- Kind
- class
- Source
- src/behaviors/BehaviorManager.js:17
Description
Runtime owner for active behavior instances on a Helios visualization.
Signature
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
helios | import('../Helios.js').Helios | Visualization controller that behaviors will attach to. | ||
registry | BehaviorRegistry | Registry used to instantiate named behaviors. |
Returns
Manager with no active behaviors attached.
TypeBehaviorManagerNotes
The manager creates, attaches, detaches, serializes, and restores
behavior instances against a shared Helios context. Use the higher-level
helios.behavior namespace for most app code.
Lifecycle
Creation, initialization, prewarming, cleanup, and renderer lifetime.
destroy()
Source: src/behaviors/BehaviorManager.js:92
Manages destroy for the current instance.
Network And Persistence
Network replacement, serialization, and visualization state persistence. ExporterBehavior and InterfaceBehavior can surface parts of this flow in the UI.
serialize()
Source: src/behaviors/BehaviorManager.js:98
Handles serialize for the current graph or visualization state.
restore(snapshot = {}) → {this}
Source: src/behaviors/BehaviorManager.js:107
Updates the restore state on the current instance.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
snapshot | optional | {} | Value passed to restore. |
Returns
This instance.
TypethisConfiguration
General configuration setters and compatibility helpers.
setUI(ui) → {this}
Source: src/behaviors/BehaviorManager.js:26
Set the ui setting.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
ui | Value passed to setUI. |
Returns
This instance.
Typethisget(id)
Source: src/behaviors/BehaviorManager.js:35
Returns the current get value or state.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
id | Value passed to get. |
Utilities
Additional public helpers that do not belong to a narrower API area.
has(id)
Source: src/behaviors/BehaviorManager.js:31
Returns the current has value or state.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
id | Value passed to has. |
entries()
Source: src/behaviors/BehaviorManager.js:39
Configures or reads entries.
values()
Source: src/behaviors/BehaviorManager.js:43
Configures or reads values.
use(idOrBehavior, options = {}) → {this}
Source: src/behaviors/BehaviorManager.js:47
Manages use for the current instance.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
idOrBehavior | Value passed to use. | |||
options | Object | optional | {} | Options object for this operation. |
Returns
This instance.
Typethisdetach(id)
Source: src/behaviors/BehaviorManager.js:68
Manages detach for the current instance.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
id | Value passed to detach. |
detachAll()
Source: src/behaviors/BehaviorManager.js:79
Manages all for the current instance.