layoutNextLine()
Lay out one line from a cursor, returning the next cursor for continuation.
Import
Section titled “Import”import { layoutNextLine } from "@graphrefly/ts/solutions/reactive-layout";Signature
Section titled “Signature”function layoutNextLine( segments: readonly PreparedSegment[], cursor: LayoutCursor, slotWidth: number, ctx?: LayoutNextLineContext,): LayoutNextLineResult | nullParameters
Section titled “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
Section titled “Returns”A LayoutNextLineResult | null value.
Example
Section titled “Example”import { layoutNextLine } from "@graphrefly/ts/solutions/reactive-layout";Source
Section titled “Source”packages/ts/src/solutions/reactive-layout/line.ts