diff --git a/apps/ops/src/composables/useMap.js b/apps/ops/src/composables/useMap.js index c01abd0..be120df 100644 --- a/apps/ops/src/composables/useMap.js +++ b/apps/ops/src/composables/useMap.js @@ -200,9 +200,16 @@ export function useMap (deps) { const totalJobs = allToday.length const completionPct = totalJobs > 0 ? completedJobs / totalJobs : 0 - // Fixed-size outer wrapper — Mapbox anchors to this + // Fixed-size outer wrapper — Mapbox anchors to this. DO NOT set + // `position:relative` inline here: Mapbox GL's `.mapboxgl-marker` + // class applies `position:absolute` and is what gets the + // `transform: translate(...)` at every zoom/pan frame. An inline + // `relative` overrides that and the pin appears to drift away from + // its lat/lng on zoom. The svg + avatar children are positioned + // absolutely; that still works against an absolutely-positioned + // parent (any positioned element is a containing block). const outer = document.createElement('div') - outer.style.cssText = `cursor:pointer;width:${SIZE}px;height:${SIZE}px;position:relative;` + outer.style.cssText = `cursor:pointer;width:${SIZE}px;height:${SIZE}px;` outer.dataset.techId = tech.id // SVG ring (load arc + completion arc) — fills entire container