Skip to content
PACKAGES

computeBlockFlow()

Stack measured blocks vertically with margins and a fixed gap.

import { computeBlockFlow } from "@graphrefly/ts/solutions/reactive-layout";
function computeBlockFlow(
blocks: readonly MeasuredBlock[],
gap = 0,
): readonly PositionedBlock[]
ParameterTypeDescription
blocksreadonly MeasuredBlock[]blocks value used by the helper.
gapunknowngap value used by the helper.

A readonly PositionedBlock[] value.

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

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