Skip to content

InterfaceBehavior

class

Back to Helios Web API

Kind
class
Source
src/behaviors/InterfaceBehavior.js:78

Description

Built-in behavior for responsive interface and touch-oriented app state.

Signature

export class InterfaceBehavior extends Behavior {

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalCompact/fullscreen breakpoints, preferred dock side, and restore-prompt behavior.

Returns

Behavior that tracks dock side, viewport class, active panels, controls visibility, and resume-session prompts.

Type InterfaceBehavior

Notes

Helios Web can render without HeliosUI; this behavior stores the serializable interface state that an app shell or UI layer can bind to.

Instance Properties

id

Source: src/behaviors/InterfaceBehavior.js:79

Id exposed by the class.

Filtering And State

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

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

Source: src/behaviors/InterfaceBehavior.js:316

Read or set the serialize interface state setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current serialize interface state value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


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

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

Source: src/behaviors/InterfaceBehavior.js:329

Updates the interface state state on the current instance.

Parameters

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

Returns

This instance.

Type this

Network And Persistence

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

attach(context)

Source: src/behaviors/InterfaceBehavior.js:95

Configures or reads attach.

Parameters

NameTypeAttributesDefaultDescription
contextValue passed to attach.

serialize()

Source: src/behaviors/InterfaceBehavior.js:286

Handles serialize for the current graph or visualization state.

restore(snapshot = {}) → {this}

Source: src/behaviors/InterfaceBehavior.js:301

Updates the restore state on the current instance.

Parameters

NameTypeAttributesDefaultDescription
snapshotoptional{}Value passed to restore.

Returns

This instance.

Type this

Camera And View

Camera framing, target following, dimensional mode, and transitions. InterfaceBehavior can expose these controls.

mode()

Source: src/behaviors/InterfaceBehavior.js:160

Configures or reads mode.

Appearance

Visual rendering settings for nodes, edges, labels, legends, density, shading, and background. AppearanceBehavior, LabelsBehavior, and LegendsBehavior cover the built-in controls.

viewportWidth()

Source: src/behaviors/InterfaceBehavior.js:172

Configures or reads viewport width.

setViewportWidth(width, options = {}) → {this}

Source: src/behaviors/InterfaceBehavior.js:176

Set the viewport width setting.

Parameters

NameTypeAttributesDefaultDescription
widthValue passed to setViewportWidth.
optionsObjectoptional{}Options object for this operation.

Returns

This instance.

Type this

Configuration

General configuration setters and compatibility helpers.

toggleDockSide()

Source: src/behaviors/InterfaceBehavior.js:156

Updates the dock side state on the current instance.

clearActiveControl() → {this}

Source: src/behaviors/InterfaceBehavior.js:264

Updates the active control state on the current instance.

Returns

This instance.

Type this

Utilities

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

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

Source: src/behaviors/InterfaceBehavior.js:103

Read or set the update setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

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

Type Object|this

Example


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

bindUI(ui = null)

Source: src/behaviors/InterfaceBehavior.js:127

Configures or reads bind ui.

Parameters

NameTypeAttributesDefaultDescription
uioptionalnullValue passed to bindUI.

compactBreakpoint(value) → {Object|this}

Source: src/behaviors/InterfaceBehavior.js:133

Read or set the compact breakpoint setting.

Parameters

NameTypeAttributesDefaultDescription
valueNew compact breakpoint value. Omit this argument to read the current value.

Returns

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

Type Object|this

Example


helios.compactBreakpoint(1);

fullscreenBreakpoint(value) → {Object|this}

Source: src/behaviors/InterfaceBehavior.js:139

Read or set the fullscreen breakpoint setting.

Parameters

NameTypeAttributesDefaultDescription
valueNew fullscreen breakpoint value. Omit this argument to read the current value.

Returns

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

Type Object|this

Example


helios.fullscreenBreakpoint(1);

dockSide(value) → {Object|this}

Source: src/behaviors/InterfaceBehavior.js:145

Read or set the dock side setting.

Parameters

NameTypeAttributesDefaultDescription
valueNew dock side value. Omit this argument to read the current value.

Returns

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

Type Object|this

Example


helios.dockSide(1);

isCompact()

Source: src/behaviors/InterfaceBehavior.js:164

Returns the current compact value or state.

Example


const value = helios.isCompact();

isFullscreen()

Source: src/behaviors/InterfaceBehavior.js:168

Returns the current fullscreen value or state.

Example


const value = helios.isFullscreen();

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

Source: src/behaviors/InterfaceBehavior.js:221

Read or set the recompute mode setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

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

Type Object|this

Example


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

controlsOpen(value) → {Object|this}

Source: src/behaviors/InterfaceBehavior.js:225

Read or set the controls open setting.

Parameters

NameTypeAttributesDefaultDescription
valueNew controls open value. Omit this argument to read the current value.

Returns

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

Type Object|this

Example


helios.controlsOpen(1);

openControlsSurface()

Source: src/behaviors/InterfaceBehavior.js:240

Configures or reads open controls surface.

closeControlsSurface()

Source: src/behaviors/InterfaceBehavior.js:244

Configures or reads close controls surface.

activateControl(panelId) → {this}

Source: src/behaviors/InterfaceBehavior.js:248

Updates the control state on the current instance.

Parameters

NameTypeAttributesDefaultDescription
panelIdValue passed to activateControl.

Returns

This instance.

Type this

interfaceVisible(value) → {number|this}

Source: src/behaviors/InterfaceBehavior.js:276

Read or set the interface visible setting.

Parameters

NameTypeAttributesDefaultDescription
valuenumberNew interface visible value. Omit this argument to read the current value.

Returns

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

Type number|this

Example


helios.interfaceVisible(1);

ensurePersistenceReady()

Source: src/behaviors/InterfaceBehavior.js:352

Configures or reads ensure persistence ready.

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

Source: src/behaviors/InterfaceBehavior.js:398

Read or set the persist responsive preferences setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current persist responsive preferences value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


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

resumePrompt()

Source: src/behaviors/InterfaceBehavior.js:418

Configures or reads resume prompt.

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

Source: src/behaviors/InterfaceBehavior.js:422

Read or set the resume session setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

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

Type Object|this

Example


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

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

Source: src/behaviors/InterfaceBehavior.js:442

Read or set the start fresh setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

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

Type Object|this

Example


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

dismissResumePrompt()

Source: src/behaviors/InterfaceBehavior.js:465

Configures or reads dismiss resume prompt.

emitChange(reason, detail = {})

Source: src/behaviors/InterfaceBehavior.js:492

Configures or reads emit change.

Parameters

NameTypeAttributesDefaultDescription
reasonstringReason for this operation.
detailoptional{}Event payload passed to listeners.