Skip to content

HeliosUI

class

Back to Helios Web API

Kind
class
Source
src/ui/HeliosUI.js:341

Description

Optional built-in control surface for a Helios visualization.

Signature

export class HeliosUI {

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalUI construction options.
heliosHeliosoptionalHelios instance to inspect and control.
containerHTMLElementoptionalExisting UI container. When omitted the UI creates or reuses a layer on the Helios root.
layerNamestringoptional'ui'Layer name used when the UI attaches to the Helios layer manager.
theme'dark'|'light'optionalInitial UI theme.
styles'default'|stringoptional'default'Built-in style preset or external style mode.
documentDocumentoptionalDocument used for custom elements and style installation.
allowDragbooleanoptionaltrueEnable dragging floating panels.
labelColumnnumber|stringoptionalOptional fixed label-column sizing for generated controls.
persistenceIndicatorsbooleanoptionalShow dirty/default markers when persistent storage supports them.
interfaceObjectoptionalInterface behavior options passed to helios.useBehavior('interface', ...).
behaviorsObjectoptionalBehavior option bag used by built-in UI behaviors.

User Interface

registerStateControl(path, options = {}) → {Function|null}

Source: src/ui/HeliosUI.js:482

Register a UI-owned value with the Helios state manager.

Parameters

NameTypeAttributesDefaultDescription
pathstringPersistent state path.
optionsObjectoptionalState metadata and UI-control hints.

Returns

Cleanup function returned by the state manager, or null when state tracking is unavailable.

Type Function|null

writeStateControl(path, value, options = {}) → {*|null}

Source: src/ui/HeliosUI.js:525

Write a UI control value through the Helios state manager.

Parameters

NameTypeAttributesDefaultDescription
pathstringPersistent state path.
value*Value to store.
optionsObjectoptionalPersistence, debounce, source, and override-tracking options.

Returns

State-manager write result, or null when state tracking is unavailable.

Type *|null

createStateIndicator(path = '', scope = null, options = {}) → {HTMLElement|null}

Source: src/ui/HeliosUI.js:563

Create a dirty/default indicator for a state path or state scope.

Parameters

NameTypeAttributesDefaultDescription
pathstringoptional''State path to observe.
scopestring|nulloptionalnullIndicator scope override.
optionsObjectoptionalRegistration and tooltip options.

Returns

Indicator element, or null when indicators are disabled.

Type HTMLElement|null

setTheme(theme, options = {}) → {void}

Source: src/ui/HeliosUI.js:621

Apply a UI theme.

Parameters

NameTypeAttributesDefaultDescription
theme'dark'|'light'|stringTheme name stored on the UI container.
optionsObjectoptional{}Options object for this operation.

Returns

Type void

toggleTheme(options = {}) → {void}

Source: src/ui/HeliosUI.js:635

Toggle between the built-in dark and light themes.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Type void

Example


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

serializeState() → {Object}

Source: src/ui/HeliosUI.js:650

Serialize UI panel, dock, theme, and responsive-interface state.

Returns

Serializable UI state snapshot.

Type Object

restoreState(state = {}) → {HeliosUI}

Source: src/ui/HeliosUI.js:669

Restore a UI state snapshot.

Parameters

NameTypeAttributesDefaultDescription
stateObjectoptional{}Snapshot returned by serializeState().

Returns

This UI instance.

Type HeliosUI

getViewportWidth() → {number}

Source: src/ui/HeliosUI.js:687

Resolve the best available viewport width for responsive UI behavior.

Returns

Width in CSS pixels, or zero when unavailable.

Type number

Example


const value = helios.getViewportWidth();

applyInterfaceBehaviorState(state = {}) → {HeliosUI}

Source: src/ui/HeliosUI.js:711

Apply responsive interface state to the UI container and panel manager.

Parameters

NameTypeAttributesDefaultDescription
stateObjectoptional{}Interface behavior snapshot.

Returns

This UI instance.

Type HeliosUI

bindHeliosAccessor(accessorName, options = {}) → {UIAttribute}

Source: src/ui/HeliosUI.js:1350

Bind a Helios accessor method to a UIAttribute.

Parameters

NameTypeAttributesDefaultDescription
accessorNamestringName of the Helios getter/setter method.
optionsObjectoptionalAttribute metadata, range, persistence, and labeling options.

Returns

Attribute wrapper suitable for controls and panels.

Type UIAttribute

bindBehaviorAccessor(behavior, accessorName, options = {}) → {UIAttribute}

Source: src/ui/HeliosUI.js:1419

Bind a behavior accessor method to a UIAttribute.

Parameters

NameTypeAttributesDefaultDescription
behaviorBehaviorBehavior instance that owns the accessor.
accessorNamestringName of the behavior getter/setter method.
optionsObjectoptionalAttribute metadata, range, persistence, and labeling options.

Returns

Attribute wrapper suitable for controls and panels.

Type UIAttribute

createPanel(options) → {Panel}

Source: src/ui/HeliosUI.js:1542

Create a standard Helios UI panel.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectPanel id, title, placement, content, schema, and persistence options.

Returns

Panel instance returned by the panel manager.

Type Panel

Example


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

createTabbedPanel(options = {}) → {Panel}

Source: src/ui/HeliosUI.js:1579

Create a panel whose content is managed by a tabbed panel primitive.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalPanel and tab options.

Returns

Created panel instance.

Type Panel

Example


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

createDemoPanel(options = {}) → {Panel}

Source: src/ui/HeliosUI.js:1607

Create the default scene/demo controls panel.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalPanel placement and title options.

Returns

Created panel instance.

Type Panel

Example


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

createFilterPanel(options = {}) → {Panel}

Source: src/ui/HeliosUI.js:4352

Create the graph filtering panel with node and edge rule editors.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalPanel placement, throttling, width, and initial filter options.

Returns

Created panel instance.

Type Panel

Example


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

createMetricsPanel(options = {}) → {Panel}

Source: src/ui/HeliosUI.js:4616

Create a metrics panel for basic graph and renderer counters.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalPanel placement and collapsed-state options.

Returns

Created panel instance.

Type Panel

Example


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

createDebugPanel(options = {}) → {Panel}

Source: src/ui/HeliosUI.js:7104

Create a debug panel for persistence and state-manager counters.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalPanel placement and refresh-window options.

Returns

Created panel instance.

Type Panel

Example


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

destroy() → {void}

Source: src/ui/HeliosUI.js:7181

Dispose all UI controls, panels, listeners, timers, and container resources.

Returns

Type void

createMappersPanel(options = {}) → {Panel}

Source: src/ui/HeliosUI.js:7206

Create the visual mapper configuration panel.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalPanel placement and mapper panel options.

Returns

Created panel instance.

Type Panel

Example


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

createLayoutPanel(options = {}) → {Panel}

Source: src/ui/HeliosUI.js:9223

Create the layout controls panel.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalPanel placement and layout panel options.

Returns

Created panel instance.

Type Panel

Example


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

createLegendsPanel(options = {}) → {Panel}

Source: src/ui/HeliosUI.js:9235

Create the legends controls panel.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalPanel placement and legend panel options.

Returns

Created panel instance.

Type Panel

Example


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

createCameraPanel(options = {}) → {Panel}

Source: src/ui/HeliosUI.js:9247

Create the camera controls panel.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalPanel placement and camera panel options.

Returns

Created panel instance.

Type Panel

Example


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

createSelectionPanel(options = {}) → {Panel}

Source: src/ui/HeliosUI.js:9259

Create the selection and hover controls panel.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalPanel placement and selection panel options.

Returns

Created panel instance.

Type Panel

Example


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

Example

const ui = new HeliosUI({ helios, theme: 'dark' });