Skip to content

HeliosStateManager

class

Back to Helios Web API

Kind
class
Source
src/state/HeliosStateManager.js:179

Description

Central live state graph for Helios defaults, bindings, overrides, and reset status.

Signature

export class HeliosStateManager extends EventTarget {

Filtering And State

Graph filtering and interaction state. When active, FilterBehavior and SelectionBehavior coordinate this area.

dirtyState()

Source: src/state/HeliosStateManager.js:399

Configures or reads dirty state.

Network And Persistence

Network replacement, serialization, and visualization state persistence. ExporterBehavior and InterfaceBehavior can surface parts of this flow in the UI.

restore(snapshot = {}, options = {}) → {this}

Source: src/state/HeliosStateManager.js:465

Updates the restore state on the current instance.

Parameters

NameTypeAttributesDefaultDescription
snapshotoptional{}Value passed to restore.
optionsObjectoptional{}Options object for this operation.

Returns

This instance.

Type this

serialize()

Source: src/state/HeliosStateManager.js:502

Handles serialize for the current graph or visualization state.

Configuration

General configuration setters and compatibility helpers.

setOverrideTrackingReady(ready = true) → {this}

Source: src/state/HeliosStateManager.js:201

Set the override tracking ready setting.

Parameters

NameTypeAttributesDefaultDescription
readyoptionaltrueValue passed to setOverrideTrackingReady.

Returns

This instance.

Type this

get(key, fallback = undefined)

Source: src/state/HeliosStateManager.js:302

Returns the current get value or state.

Parameters

NameTypeAttributesDefaultDescription
keyValue passed to get.
fallbackoptionalundefinedValue passed to get.

set(key, value, options = {}) → {this}

Source: src/state/HeliosStateManager.js:310

Set the set setting.

Parameters

NameTypeAttributesDefaultDescription
keyValue passed to set.
valueNew set value. Omit this argument to read the current value.
optionsObjectoptional{}Options object for this operation.

Returns

This instance.

Type this

setDefault(key, value, options = {}) → {this}

Source: src/state/HeliosStateManager.js:314

Set the default setting.

Parameters

NameTypeAttributesDefaultDescription
keyValue passed to setDefault.
valueNew set default value. Omit this argument to read the current value.
optionsObjectoptional{}Options object for this operation.

Returns

This instance.

Type this

reset(keyOrPrefix, options = {}) → {this}

Source: src/state/HeliosStateManager.js:345

Updates the reset state on the current instance.

Parameters

NameTypeAttributesDefaultDescription
keyOrPrefixValue passed to reset.
optionsObjectoptional{}Options object for this operation.

Returns

This instance.

Type this

resetToDefault(keyOrPrefix, options = {}) → {this}

Source: src/state/HeliosStateManager.js:365

Updates the to default state on the current instance.

Parameters

NameTypeAttributesDefaultDescription
keyOrPrefixValue passed to resetToDefault.
optionsObjectoptional{}Options object for this operation.

Returns

This instance.

Type this

getOverrides(options = {}) → {Object|this}

Source: src/state/HeliosStateManager.js:520

Read or set the get overrides setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current get overrides value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


helios.getOverrides({
  enabled: true,
});

Utilities

Additional public helpers that do not belong to a narrower API area.

register(owner, prefix, entries = {}) → {this}

Source: src/state/HeliosStateManager.js:206

Manages register for the current instance.

Parameters

NameTypeAttributesDefaultDescription
ownerValue passed to register.
prefixValue passed to register.
entriesoptional{}Value passed to register.

Returns

This instance.

Type this

entry(key)

Source: src/state/HeliosStateManager.js:289

Configures or reads entry.

Parameters

NameTypeAttributesDefaultDescription
keyValue passed to entry.

entriesFor(prefix = '')

Source: src/state/HeliosStateManager.js:295

Configures or reads entries for.

Parameters

NameTypeAttributesDefaultDescription
prefixoptional''Value passed to entriesFor.

status(keyOrPrefix)

Source: src/state/HeliosStateManager.js:369

Configures or reads status.

Parameters

NameTypeAttributesDefaultDescription
keyOrPrefixValue passed to status.

subscribe(keyOrPrefix, callback, options = {})

Source: src/state/HeliosStateManager.js:415

Configures or reads subscribe.

Parameters

NameTypeAttributesDefaultDescription
keyOrPrefixValue passed to subscribe.
callbackValue passed to subscribe.
optionsObjectoptional{}Options object for this operation.

transaction(options = {}, callback = null)

Source: src/state/HeliosStateManager.js:433

Configures or reads transaction.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.
callbackoptionalnullValue passed to transaction.

Example


helios.transaction({
  enabled: true,
});

snapshot(options = {}) → {Object|this}

Source: src/state/HeliosStateManager.js:487

Read or set the snapshot setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current snapshot value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


helios.snapshot({
  enabled: true,
});

preferredKey(key)

Source: src/state/HeliosStateManager.js:510

Configures or reads preferred key.

Parameters

NameTypeAttributesDefaultDescription
keyValue passed to preferredKey.

overrideKeys()

Source: src/state/HeliosStateManager.js:516

Configures or reads override keys.

resolveKey(key)

Source: src/state/HeliosStateManager.js:538

Configures or reads resolve key.

Parameters

NameTypeAttributesDefaultDescription
keyValue passed to resolveKey.

debugStats(options = {}) → {Object|this}

Source: src/state/HeliosStateManager.js:713

Read or set the debug stats setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current debug stats value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


helios.debugStats({
  enabled: true,
});