Skip to main content

Class: DefaultLayouts

Provides a web worker with basic diagram layout algorithms.

Constructors

new DefaultLayouts()

new DefaultLayouts(): DefaultLayouts

Returns

DefaultLayouts

Methods

defaultLayout()

defaultLayout(graph, state, options?): Promise<LayoutState>

Default layout algorithm, the same as blockingDefaultLayout but non-blocking due to being run in a worker.

Parameters

ParameterType

graph

LayoutGraph

state

LayoutState

options?

DefaultLayoutOptions

Returns

Promise<LayoutState>

See

blockingDefaultLayout

Defined in

layout.worker.ts:21


flowLayout()

flowLayout(graph, state, options?): Promise<LayoutState>

Flow layout algorithm from cola.js.

Parameters

ParameterType

graph

LayoutGraph

state

LayoutState

options?

ColaFlowLayoutOptions

Returns

Promise<LayoutState>

Defined in

layout.worker.ts:43


forceLayout()

forceLayout(graph, state, options?): Promise<LayoutState>

Force-directed layout algorithm from cola.js.

Parameters

ParameterType

graph

LayoutGraph

state

LayoutState

options?

ColaForceLayoutOptions

Returns

Promise<LayoutState>

Defined in

layout.worker.ts:32


removeOverlaps()

removeOverlaps(graph, state): Promise<LayoutState>

Remove overlaps algorithm from cola.js.

Parameters

ParameterType

graph

LayoutGraph

state

LayoutState

Returns

Promise<LayoutState>

Defined in

layout.worker.ts:54