diff --git a/apps/planner/app/components/PlannerMap.tsx b/apps/planner/app/components/PlannerMap.tsx index 392f16d..ce969ec 100644 --- a/apps/planner/app/components/PlannerMap.tsx +++ b/apps/planner/app/components/PlannerMap.tsx @@ -10,7 +10,7 @@ import { parseGpxAsync, extractWaypoints } from "@trails-cool/gpx"; import { isOvernight } from "~/lib/overnight"; import { setOvernight } from "~/lib/overnight"; import { usePois } from "~/lib/use-pois"; -import { Z_CURSOR, Z_WAYPOINT, Z_HIGHLIGHT } from "~/lib/z-index"; +import { Z_CURSOR, Z_WAYPOINT, Z_WAYPOINT_HIGHLIGHTED, Z_HIGHLIGHT } from "~/lib/z-index"; import { NoGoAreaLayer } from "./NoGoAreaLayer"; import { ColoredRoute, findSegmentForPoint, type ColorMode } from "./ColoredRoute"; import { RouteInteraction } from "./RouteInteraction"; @@ -520,7 +520,7 @@ export function PlannerMap({ yjs, onRouteRequest, highlightPosition, highlighted key={i} position={[wp.lat, wp.lon]} draggable - zIndexOffset={Z_WAYPOINT} + zIndexOffset={highlightedWaypoint === i ? Z_WAYPOINT_HIGHLIGHTED : Z_WAYPOINT} icon={waypointIcon(i, wp.overnight, highlightedWaypoint === i)} eventHandlers={{ mouseover: () => { diff --git a/apps/planner/app/lib/z-index.ts b/apps/planner/app/lib/z-index.ts index 7466427..0d6202e 100644 --- a/apps/planner/app/lib/z-index.ts +++ b/apps/planner/app/lib/z-index.ts @@ -5,8 +5,9 @@ * Rendering order (bottom to top): * POI markers → cursor markers → ghost waypoint → waypoint markers → highlight dot */ -export const Z_POI_MARKER = -1000; export const Z_CURSOR = -1000; export const Z_GHOST_WAYPOINT = -100; export const Z_WAYPOINT = 1000; +export const Z_WAYPOINT_HIGHLIGHTED = 1200; +export const Z_POI_MARKER = 1500; export const Z_HIGHLIGHT = 2000;