mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Bring CP markers to the front.
This commit is contained in:
parent
8ec133830f
commit
16b52f929c
@ -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(`<h3 style="margin: 0;">${cp.name}</h3>`, {
|
||||
permanent: zoom >= SHOW_BASE_NAME_AT_ZOOM,
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user