API Reference
layoutNextLine()
Lay out one line from a cursor, returning the next cursor for continuation.
Import
import { layoutNextLine } from "@graphrefly/ts/solutions/reactive-layout";
Signature
function layoutNextLine(
segments: readonly PreparedSegment[],
cursor: LayoutCursor,
slotWidth: number,
ctx?: LayoutNextLineContext,
): LayoutNextLineResult | null
Parameters
| Parameter | Type | Description |
|---|---|---|
segments | readonly PreparedSegment[] | segments value used by the helper. |
cursor | LayoutCursor | cursor value used by the helper. |
slotWidth | number | slot width value used by the helper. |
ctx | LayoutNextLineContext | Node execution context supplied by the dispatcher. |
Returns
A LayoutNextLineResult | null value.
Example
import { layoutNextLine } from "@graphrefly/ts/solutions/reactive-layout";
Source
packages/ts/src/solutions/reactive-layout/line.ts