update build

This commit is contained in:
Vladimir Agafonkin 2013-06-25 19:42:38 -04:00
parent c56e3762ac
commit 3374166028
2 changed files with 17 additions and 5 deletions

18
dist/leaflet-src.js vendored
View File

@ -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

File diff suppressed because one or more lines are too long