Docs

Search documentation

Shared docs and current release

Loading search…

日本語

@shumoku/core · 0.4.2 · function

layoutDrawing

Source

Lays a network out as a scene: where each box stands and how each line runs. `network` is the configuration as written, `structure` what follows from it and the boundary points, and `metrics` every length the drawing may use. Every discrete choice is made from relations and indices before any coordinate, one stage after another, and the coordinates are solved once for each axis at the end: the ranks (`ranksOf`) from the flows, the left-to-right order of every rank (`layersOf`), the free space cut into corridors (`corridorsOf`), each line's way through them (`routesOf`), the order of the lines in each corridor (`tracksOf`), what the ports and corridors ask of the sizes (`needsOf`), and the coordinates (`placeAll`). No stage reads a length to decide, so a font that measures a little differently moves things a little and changes nothing else.

layoutDrawing(network: Network, structure: Structure, metrics: Metrics, options?: LayoutOptions): Scene

Parameters

Parameter Type Description Default
network Network No additional description. —
structure Structure No additional description. —
metrics Metrics No additional description. —
options LayoutOptions No additional description. {}

Returns

Scene

libs/@shumoku/core/src/libs/@shumoku/core/src/drawing/layout.ts:67