Skip to content

Commit 100c7b1

Browse files
committed
Fix overlay z-ordering so risk dots render above alert clusters
MarkerClusterGroup ignores pane options on child markers. Instead, create overlayPane at z-index 650 (above default markerPane at 600) so VIEWS risk dots and other overlays are always clickable.
1 parent 95aebb9 commit 100c7b1

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/components/GlobeView.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -530,11 +530,10 @@ export function GlobeView({
530530
{ maxZoom: 18, subdomains: "abcd", noWrap: true },
531531
).addTo(map);
532532

533-
// Custom panes: alerts underneath, overlays on top (clickable risk dots)
534-
const alertPane = map.createPane("alertPane");
535-
alertPane.style.zIndex = "450";
533+
// Custom panes: overlays on top so risk dots are clickable above alert clusters.
534+
// Leaflet default markerPane is z-index 600; we push overlays above it.
536535
const overlayPane = map.createPane("overlayPane");
537-
overlayPane.style.zIndex = "500";
536+
overlayPane.style.zIndex = "650";
538537

539538
L.control.zoom({ position: "bottomright" }).addTo(map);
540539

@@ -612,7 +611,7 @@ export function GlobeView({
612611
const selected = alert.alert_id === selectedId;
613612
const text = textHex();
614613
const marker = L.circleMarker([alert.lat, alert.lng], {
615-
pane: "alertPane",
614+
616615
radius: selected ? (isNowAndHistoryMode ? 9 : 10) : (isNowAndHistoryMode ? 5 : 6),
617616
fillColor: severityHex(alert.severity),
618617
color: selected ? `${text}${isNowAndHistoryMode ? "AA" : "CC"}` : `${text}${isNowAndHistoryMode ? "4D" : "66"}`,
@@ -638,7 +637,7 @@ export function GlobeView({
638637
const selected = alert.alert_id === selectedId;
639638
const text = textHex();
640639
const marker = L.circleMarker([alert.lat, alert.lng], {
641-
pane: "alertPane",
640+
642641
radius: selected ? 11 : 7,
643642
fillColor: severityHex(alert.severity),
644643
color: selected ? text : `${text}59`,

0 commit comments

Comments
 (0)