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
| Parameter | Type | Description |
|---|---|---|
obstacles | readonly Obstacle[] | Obstacles to test. |
bandTop | number | Top edge of the band. |
bandBottom | number | Bottom edge of the band. |
Returns
Sorted blocked intervals inside the band.
Example
blockedIntervalsForBand([], 0, 20);
Source
packages/ts/src/solutions/reactive-layout/flow.ts