mirror of
https://github.com/Leaflet/Leaflet.git
synced 2025-07-29 11:53:03 +00:00
Removes mozEvent warning (#9650)
This commit is contained in:
@ -1410,18 +1410,13 @@ export const Map = Evented.extend({
|
|||||||
|
|
||||||
_fireDOMEvent(e, type, canvasTargets) {
|
_fireDOMEvent(e, type, canvasTargets) {
|
||||||
|
|
||||||
if (e.type === 'click') {
|
if (type === 'click') {
|
||||||
// Fire a synthetic 'preclick' event which propagates up (mainly for closing popups).
|
// Fire a synthetic 'preclick' event which propagates up (mainly for closing popups).
|
||||||
// @event preclick: MouseEvent
|
// @event preclick: MouseEvent
|
||||||
// Fired before mouse click on the map (sometimes useful when you
|
// Fired before mouse click on the map (sometimes useful when you
|
||||||
// want something to happen on click before any existing click
|
// want something to happen on click before any existing click
|
||||||
// handlers start running).
|
// handlers start running).
|
||||||
const synth = {};
|
this._fireDOMEvent(e, 'preclick', canvasTargets);
|
||||||
for (const i in e) {
|
|
||||||
synth[i] = e[i];
|
|
||||||
}
|
|
||||||
synth.type = 'preclick';
|
|
||||||
this._fireDOMEvent(synth, synth.type, canvasTargets);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find the layer the event is propagating from and its parents.
|
// Find the layer the event is propagating from and its parents.
|
||||||
|
Reference in New Issue
Block a user