Skip to main content

Interface: LayoutOptions

Options shared by every auto-layout engine.

Extended by​

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.


detailLevel?​

detailLevel?: DetailLevel;

direction?​

direction?: "RIGHT" | "DOWN";

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.


measure?​

measure?: TextMeasure;

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


saved?​

saved?: Partial<ViewLayout> | null;

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