Skip to main content
cngx-src documentation

resolveBoundaryStep

Functioncore/navv0.1.0

projects/core/nav/step-resolver.ts

Description#

Resolve the first (direction: 1) or last (direction: -1) enabled index of the range, or null when the range is empty or fully disabled. The Home/End counterpart of resolveStepFrom.

Signature#

resolveBoundaryStep(direction, scan: CngxStepScan)

Parameters#

@paramdirection

1 scans from the start, -1 from the end.

@paramscanCngxStepScan

The range description (loop is irrelevant here).

Returns#

number | null

The boundary-nearest enabled index, or null.