Skip to content
PACKAGES

layoutNextLine()

Lay out one line from a cursor, returning the next cursor for continuation.

import { layoutNextLine } from "@graphrefly/ts/solutions/reactive-layout";
function layoutNextLine(
segments: readonly PreparedSegment[],
cursor: LayoutCursor,
slotWidth: number,
ctx?: LayoutNextLineContext,
): LayoutNextLineResult | null
ParameterTypeDescription
segmentsreadonly PreparedSegment[]segments value used by the helper.
cursorLayoutCursorcursor value used by the helper.
slotWidthnumberslot width value used by the helper.
ctxLayoutNextLineContextNode execution context supplied by the dispatcher.

A LayoutNextLineResult | null value.

import { layoutNextLine } from "@graphrefly/ts/solutions/reactive-layout";

packages/ts/src/solutions/reactive-layout/line.ts