gregallensworth/L.Control.BoxZoom

Cursor issue for svg path elements

Closed this issue · 1 comments

Leaflet uses "cursor: pointer" in the class .leaflet-interactive on svg path elements. This overrides the "cursor: crosshair !important" for .leaflet-container.leaflet-control-boxzoom-active. This means that when trying to create a box zoom over svg path elements the cursor will flip back and forth between crosshair and pointer.

Adding an additional selector for .leaflet-interactive for the path element worked around the issue for us. Not sure if there's a better way though.

.leaflet-container.leaflet-control-boxzoom-active,
.leaflet-container.leaflet-control-boxzoom-active path.leaflet-interactive {
cursor:crosshair !important;
}

Thank you very much for noticing this and for fixing it. I have merged your CSS adjustment.