Skip to main content

Interface: AutoLayoutOptions

Options of layoutDiagram: the contract's LayoutOptions plus ELK worker support.

Extends​

Properties​

aspectRatio?​

aspectRatio?: number;

Width / height of the viewport the diagram will be shown in (default 1.6, clamped to 0.25..4). Disconnected parts of the schema and sticky notes are packed to match it.

Inherited from​

LayoutOptions.aspectRatio


detailLevel?​

detailLevel?: DetailLevel;

Inherited from​

LayoutOptions.detailLevel


direction?​

direction?: "RIGHT" | "DOWN";

Inherited from​

LayoutOptions.direction


engine?​

engine?: "auto" | "elk" | "dagre" | "grid";

'elk' (default of layoutDiagram, async, best), 'dagre' (fast, sync, default of layoutDiagramSync), 'grid' (trivial fallback), 'auto' (layoutDiagram: dagre for small connected components without groups, ELK for the rest; layoutDiagramSync treats it as dagre). See docs/design/autolayout.md.

Inherited from​

LayoutOptions.engine


measure?​

measure?: TextMeasure;

Defaults to estimateTextWidth (deterministic, works in Node/SSR).

Inherited from​

LayoutOptions.measure


saved?​

saved?: Partial<ViewLayout> | null;

Saved positions for this view; nodes with x/y keep them, the rest are placed around them.

Inherited from​

LayoutOptions.saved


workerUrl?​

workerUrl?: string | URL;

URL of elkjs/lib/elk-worker.min.js as served by the app (browsers only). When set and Worker exists, ELK runs in a Web Worker; otherwise it runs in-process. Ignored by layoutDiagramSync.