GraphReFlyTS

API Reference

blockedIntervalsForBand()

Collect obstacle intervals that intersect a horizontal band.

Import

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

Signature

function blockedIntervalsForBand(
	obstacles: readonly Obstacle[],
	bandTop: number,
	bandBottom: number,
): Interval[]

Parameters

ParameterTypeDescription
obstaclesreadonly Obstacle[]Obstacles to test.
bandTopnumberTop edge of the band.
bandBottomnumberBottom edge of the band.

Returns

Sorted blocked intervals inside the band.

Example

blockedIntervalsForBand([], 0, 20);

Source

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