Skip to content
PACKAGES

measureBlocks()

Measure a block list while sharing a measurement cache across text blocks.

import { measureBlocks } from "@graphrefly/ts/solutions/reactive-layout";
function measureBlocks(
blocks: readonly ContentBlock[],
opts: MeasureBlockOptions,
): readonly MeasuredBlock[]
ParameterTypeDescription
blocksreadonly ContentBlock[]blocks value used by the helper.
optsMeasureBlockOptionsOptions that configure the helper.

A readonly MeasuredBlock[] value.

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

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