update build
This commit is contained in:
parent
c56e3762ac
commit
3374166028
18
dist/leaflet-src.js
vendored
18
dist/leaflet-src.js
vendored
@ -6386,10 +6386,22 @@ L.DomEvent = {
|
||||
return e;
|
||||
},
|
||||
|
||||
// this solves a bug in Android WebView where a single touch triggers two click events.
|
||||
// this is a horrible workaround for a bug in Android where a single touch triggers two click events
|
||||
_filterClick: function (e, handler) {
|
||||
// check if click is simulated on the element, and if it is, reject any non-simulated events
|
||||
if (e.target._simulatedClick && !e._simulated) { return; }
|
||||
var timeStamp = (e.timeStamp || e.originalEvent.timeStamp),
|
||||
elapsed = L.DomEvent._lastClick && (timeStamp - L.DomEvent._lastClick);
|
||||
|
||||
// are they closer together than 1000ms yet more than 100ms?
|
||||
// Android typically triggers them ~300ms apart while multiple listeners
|
||||
// on the same event should be triggered far faster;
|
||||
// or check if click is simulated on the element, and if it is, reject any non-simulated events
|
||||
|
||||
if ((elapsed && elapsed > 100 && elapsed < 1000) || (e.target._simulatedClick && !e._simulated)) {
|
||||
L.DomEvent.stop(e);
|
||||
return;
|
||||
}
|
||||
L.DomEvent._lastClick = timeStamp;
|
||||
|
||||
return handler(e);
|
||||
}
|
||||
};
|
||||
|
4
dist/leaflet.js
vendored
4
dist/leaflet.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user