Skip to content

getNearestDanglingEndpointInRange

since v1.4.0

getNearestDanglingEndpointInRange(edges, point, range): null | DanglingEndpoint

Finds the free edge endpoint nearest to point within range, or null when none is close enough. It works like getNearestPortInRange, but for the free endpoints of dangling edges. Temporary and effectively hidden edges are skipped.

readonly Edge<object>[]

The edges to scan.

Point

The point to measure from.

number

The maximum distance from point.

null | DanglingEndpoint

The nearest free endpoint, or null.