Skip to main content

@react-sigma/layout-core

React Sigma core module for layouts. It contains all the standard components & hooks for managing layout.

Interfaces

Type Aliases

LayoutHook

Ƭ LayoutHook<T>: (settings?: T) => { assign: () => void ; positions: () => { [node: string]: { [dimension: string]: number; }; } }

Generic type for layout hooks.

Type parameters

Name
T

Type declaration

▸ (settings?): Object

Parameters
NameType
settings?T
Returns

Object

NameTypeDescription
assign() => void-
positions() => { [node: string]: { [dimension: string]: number; }; }-

Defined in

useLayoutFactory.ts:17


LayoutWorkerHook

Ƭ LayoutWorkerHook<T>: (settings: T) => { isRunning: boolean ; kill: () => void ; start: () => void ; stop: () => void }

Type parameters

Name
T

Type declaration

▸ (settings): Object

Parameters
NameType
settingsT
Returns

Object

NameType
isRunningboolean
kill() => void
start() => void
stop() => void

Defined in

useWorkerLayoutFactory.ts:6

Functions

WorkerLayoutControl

WorkerLayoutControl<T>(«destructured»): Element

Type parameters

Name
T

Parameters

NameType
«destructured»WorkerLayoutControlProps<T>

Returns

Element

Defined in

WorkerLayoutControl.tsx:69


useLayoutFactory

useLayoutFactory<T>(layout, defaultSettings): LayoutHook<T>

Factory for layout hook.

Type parameters

Name
T

Parameters

NameType
layoutGraphologyLayout<T>
defaultSettingsT

Returns

LayoutHook<T>

Defined in

useLayoutFactory.ts:31


useWorkerLayoutFactory

useWorkerLayoutFactory<T>(worker): LayoutWorkerHook<T>

Type parameters

Name
T

Parameters

NameType
workerGraphologyWorkerLayoutConstructor<T>

Returns

LayoutWorkerHook<T>

Defined in

useWorkerLayoutFactory.ts:23