@shumoku/core · 0.4.0 · function
autoLayoutFlatTree
Lay out a network graph using the flat-tree algorithm, using the supplied `LayoutEngine` for rules (sizes, gaps, label widths). Equivalent to the legacy `layoutNetwork(graph, options)`, but the engine is now a first-class concept. The same engine instance can also serve manual placement (`engine.tryPlace`) so layout and drag-snap stay consistent.
autoLayoutFlatTree(graph: NetworkGraph, engine: LayoutEngine, options?: AutoLayoutOptions): AutoLayoutResult Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
graph | NetworkGraph | No additional description. | — |
engine | LayoutEngine | No additional description. | — |
options | AutoLayoutOptions | No additional description. | {} |
Returns
AutoLayoutResult libs/@shumoku/core/src/layout/auto-placement/flat-tree/auto-layout.ts:222