From 16b52f929c04ae9e8c44356aa576ff2096f37b0b Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Sat, 15 May 2021 00:21:22 -0700 Subject: [PATCH] Bring CP markers to the front. --- resources/ui/map/map.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/ui/map/map.js b/resources/ui/map/map.js index 93bbe064..e32dece8 100644 --- a/resources/ui/map/map.js +++ b/resources/ui/map/map.js @@ -126,7 +126,10 @@ function drawControlPoints() { controlPointsLayer.clearLayers(); const zoom = map.getZoom(); game.controlPoints.forEach((cp) => { - L.marker(cp.position, { icon: iconFor(cp.blue) }) + // We might draw other markers on top of the CP. The tooltips from the other + // markers are helpful so we want to keep them, but make sure the CP is always + // the clickable thing. + L.marker(cp.position, { icon: iconFor(cp.blue), zIndexOffset: 1000 }) .bindTooltip(`

${cp.name}

`, { permanent: zoom >= SHOW_BASE_NAME_AT_ZOOM, })