API Reference
computeBlockFlow()
Stack measured blocks vertically with margins and a fixed gap.
Import
import { computeBlockFlow } from "@graphrefly/ts/solutions/reactive-layout";
Signature
function computeBlockFlow(
blocks: readonly MeasuredBlock[],
gap = 0,
): readonly PositionedBlock[]
Parameters
| Parameter | Type | Description |
|---|---|---|
blocks | readonly MeasuredBlock[] | blocks value used by the helper. |
gap | unknown | gap value used by the helper. |
Returns
A readonly PositionedBlock[] value.
Example
import { computeBlockFlow } from "@graphrefly/ts/solutions/reactive-layout";
Source
packages/ts/src/solutions/reactive-layout/block.ts