trails/apps/planner/app/lib/z-index.ts
Ullrich Schäfer 337df6b527
Fix marker z-ordering: waypoints and highlight above POIs and route
Extract all Leaflet zIndexOffset values into z-index.ts constants:
  POI markers (-1000) < cursors (-1000) < ghost waypoint (-100)
  < waypoint markers (1000) < highlight dot (2000)

Replaced CircleMarker highlight with a Marker+DivIcon so it
participates in z-index ordering above waypoint markers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 01:46:55 +02:00

12 lines
417 B
TypeScript

/**
* Leaflet marker z-index offsets for consistent layering.
* Higher values render on top of lower values.
*
* 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_HIGHLIGHT = 2000;