GraphReFlyTS

API Reference

carveTextLineSlots()

Subtract obstacle intervals from a horizontal text band.

Import

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

Signature

function carveTextLineSlots(
	base: Interval,
	blocked: readonly Interval[],
	minSlotWidth = 0,
): Interval[]

Parameters

ParameterTypeDescription
baseIntervalbase value used by the helper.
blockedreadonly Interval[]blocked value used by the helper.
minSlotWidthunknownmin slot width value used by the helper.

Returns

A Interval[] value.

Example

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

Source

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