UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

20 lines 1.01 kB
import { type RouteLine, type RoutePoint } from "../types"; /** * Ensures that `routeLines` run in the from→to direction. * * A* returns paths in target→source order. For rendering (arrow animation, * route progress split) and remaining-distance computation the lines must * go from the origin to the destination. * * Direction is decided by projecting `from` (or `to` as a fallback) onto * `routeLines`: if the anchor lands closer to the polyline end than to * its start, the array is reversed and each segment's endpoints are * flipped to keep continuity. * * @param routeLines Lines to normalize. * @param from Route origin (user-selected "from" point). * @param to Route destination (user-selected "to" point). * @returns Lines guaranteed to run from→to, or the original array unchanged. */ export declare function normalizeRouteDirection(routeLines: RouteLine[], from: RoutePoint, to: RoutePoint): RouteLine[]; //# sourceMappingURL=normalizeRouteDirection.d.ts.map