Skip to content
PACKAGES

blockedIntervalsForBand()

Collect obstacle intervals that intersect a horizontal band.

import { blockedIntervalsForBand } from "@graphrefly/ts/solutions/reactive-layout";
function blockedIntervalsForBand(
obstacles: readonly Obstacle[],
bandTop: number,
bandBottom: number,
): Interval[]
ParameterTypeDescription
obstaclesreadonly Obstacle[]Obstacles to test.
bandTopnumberTop edge of the band.
bandBottomnumberBottom edge of the band.

Sorted blocked intervals inside the band.

blockedIntervalsForBand([], 0, 20);

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