Skip to content

Layout

class

Back to Helios Web API

Kind
class
Source
src/layouts/Layout.js:34

Description

Base class for layout algorithms.

Signature

export class Layout {

Parameters

NameTypeAttributesDefaultDescription
networkHeliosNetworkSource graph.
visualsimport('../pipeline/VisualAttributes.js').VisualAttributesVisual attribute owner used by renderers.

Notes

Concrete implementations override lifecycle hooks to move nodes by writing into _helios_visuals_position.

Lifecycle

Creation, initialization, prewarming, cleanup, and renderer lifetime.

initialize()

Source: src/layouts/Layout.js:44

Configures or reads initialize.

Layout And Positions

Layout selection, position sources, interpolation, and position snapshots. LayoutBehavior handles the built-in layout UI.

isPositionHandoffPending()

Source: src/layouts/Layout.js:86

Returns the current position handoff pending value or state.

Example


const value = helios.isPositionHandoffPending();

beginPositionHandoff()

Source: src/layouts/Layout.js:90

Configures or reads begin position handoff.

completePositionHandoff(snapshot = null, options = {})

Source: src/layouts/Layout.js:96

Configures or reads complete position handoff.

Parameters

NameTypeAttributesDefaultDescription
snapshotoptionalnullValue passed to completePositionHandoff.
optionsObjectoptional{}Options object for this operation.

seedFromPositionSnapshot(snapshot, options = {})

Source: src/layouts/Layout.js:105

Configures or reads seed from position snapshot.

Parameters

NameTypeAttributesDefaultDescription
snapshotValue passed to seedFromPositionSnapshot.
optionsObjectoptional{}Options object for this operation.

Configuration

General configuration setters and compatibility helpers.

setUpdateListener(listener) → {this}

Source: src/layouts/Layout.js:61

Set the update listener setting.

Parameters

NameTypeAttributesDefaultDescription
listenerValue passed to setUpdateListener.

Returns

This instance.

Type this

getParameterBindings()

Source: src/layouts/Layout.js:71

Returns the current parameter bindings value or state.

Example


const value = helios.getParameterBindings();

Utilities

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

shouldRun()

Source: src/layouts/Layout.js:46

Configures or reads should run.

requestUpdate() → {this}

Source: src/layouts/Layout.js:50

Configures or reads request update.

Returns

This instance.

Type this

step()

Source: src/layouts/Layout.js:54

Configures or reads step.

resize()

Source: src/layouts/Layout.js:59

Configures or reads resize.

emitUpdate(payload)

Source: src/layouts/Layout.js:65

Configures or reads emit update.

Parameters

NameTypeAttributesDefaultDescription
payloadValue passed to emitUpdate.

reheat(reason = 'layout')

Source: src/layouts/Layout.js:80

Configures or reads reheat.

Parameters

NameTypeAttributesDefaultDescription
reasonstringoptional'layout'Reason for this operation.

dispose()

Source: src/layouts/Layout.js:148

Configures or reads dispose.