Make non-interactive markers not fire pointer events
* Make non-interactive markers not fire pointer events, fixes #3936 * Make non-interactive image overlays and SVGs not fire pointer events * Make gridlayers non-interactive, fixing #2396 too.
This commit is contained in:
parent
4bcc89bc54
commit
0cfe85897f
14
dist/leaflet.css
vendored
14
dist/leaflet.css
vendored
@ -203,6 +203,20 @@
|
|||||||
cursor: -moz-grabbing;
|
cursor: -moz-grabbing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* marker & overlays interactivity */
|
||||||
|
.leaflet-marker-icon,
|
||||||
|
.leaflet-marker-shadow,
|
||||||
|
.leaflet-image-layer,
|
||||||
|
.leaflet-pane > svg path,
|
||||||
|
.leaflet-tile-container {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.leaflet-marker-icon.leaflet-interactive,
|
||||||
|
.leaflet-image-layer.leaflet-interactive,
|
||||||
|
.leaflet-pane > svg path.leaflet-interactive {
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
|
||||||
/* visual tweaks */
|
/* visual tweaks */
|
||||||
|
|
||||||
|
@ -149,8 +149,6 @@ L.SVG = L.Renderer.extend({
|
|||||||
} else {
|
} else {
|
||||||
path.setAttribute('fill', 'none');
|
path.setAttribute('fill', 'none');
|
||||||
}
|
}
|
||||||
|
|
||||||
path.setAttribute('pointer-events', options.pointerEvents || (options.interactive ? 'visiblePainted' : 'none'));
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_updatePoly: function (layer, closed) {
|
_updatePoly: function (layer, closed) {
|
||||||
|
Loading…
Reference in New Issue
Block a user