Skip to content

@graphty/layout / index / LayoutEntry

Interface: LayoutEntry ​

Defined in: catalog.ts:43

One layout of the catalog.

Properties ​

accelerator ​

readonly accelerator: LayoutAcceleratorMethod | null

Defined in: catalog.ts:56

The LayoutAccelerator method that can run the simulation; null when it runs only on the CPU.


direction ​

readonly direction: "directed" | "any" | "undirected"

Defined in: catalog.ts:51

The graphs it accepts: every layout here takes directed and undirected snapshots alike.


fn ​

readonly fn: ((...args) => LayoutResult) | null

Defined in: catalog.ts:47

The one-shot function, fn(snapshot, options); null for a layout that only runs as a simulation.


name ​

readonly name: string

Defined in: catalog.ts:45

The one-shot function's export name (for a simulation-only layout, its accelerator method's name).


requiredOptions ​

readonly requiredOptions: readonly string[]

Defined in: catalog.ts:54

Options it throws without, or that name a column the snapshot must hold under their default.


requiresAccelerator ​

readonly requiresAccelerator: boolean

Defined in: catalog.ts:58

True when there is no CPU implementation: createSimulation throws unless the accelerator implements it.


simulation ​

readonly simulation: SimulationType | null

Defined in: catalog.ts:49

The createSimulation type that runs this layout step by step; null for a one-shot-only layout.


weights ​

readonly weights: LayoutWeightUse

Defined in: catalog.ts:52