spatial-monorepo / wayfinding/src / resolveOriginCandidates
Function: resolveOriginCandidates()
resolveOriginCandidates(
graph,origin,opts):string[]
Defined in: packages/wayfinding/src/directions.ts:270
Resolve origin into a candidate list of node ids to try, per issue #470:
NavTarget→ single-element arrayNavTarget[]→ as given (nearest-of-many resolved by the caller below)null→ the injected current-location chain:opts.currentLocationId, falling back toopts.youAreHereMarkerId
This is a strict-priority fallback, NOT a nearest-of-many resolution: when currentLocationId is given and resolves to a node in graph, it is used alone — youAreHereMarkerId is only consulted when the live position is absent or does not resolve. (Feeding both into the array/nearest-of-many path would let a farther-but-valid live position lose to a closer kiosk marker, which is the opposite of "prefer the live position.")
Parameters
graph
origin
string | string[] | null
opts
Returns
string[]
