aboutsummaryrefslogtreecommitdiffstats
path: root/extlib/leaflet/src/dom/DomEvent.DoubleTap.js
diff options
context:
space:
mode:
Diffstat (limited to 'extlib/leaflet/src/dom/DomEvent.DoubleTap.js')
-rw-r--r--extlib/leaflet/src/dom/DomEvent.DoubleTap.js41
1 files changed, 0 insertions, 41 deletions
diff --git a/extlib/leaflet/src/dom/DomEvent.DoubleTap.js b/extlib/leaflet/src/dom/DomEvent.DoubleTap.js
deleted file mode 100644
index 08bd79b9..00000000
--- a/extlib/leaflet/src/dom/DomEvent.DoubleTap.js
+++ /dev/null
@@ -1,41 +0,0 @@
-L.Util.extend(L.DomEvent, {
- // inspired by Zepto touch code by Thomas Fuchs
- addDoubleTapListener: function(obj, handler, id) {
- var last,
- doubleTap = false,
- delay = 250,
- touch,
- pre = '_leaflet_',
- touchstart = 'touchstart',
- touchend = 'touchend';
-
- function onTouchStart(e) {
- if (e.touches.length != 1) return;
-
- var now = Date.now(),
- delta = now - (last || now);
-
- touch = e.touches[0];
- doubleTap = (delta > 0 && delta <= delay);
- last = now;
- }
- function onTouchEnd(e) {
- if (doubleTap) {
- touch.type = 'dblclick';
- handler(touch);
- last = null;
- }
- }
- obj[pre + touchstart + id] = onTouchStart;
- obj[pre + touchend + id] = onTouchEnd;
-
- obj.addEventListener(touchstart, onTouchStart, false);
- obj.addEventListener(touchend, onTouchEnd, false);
- },
-
- removeDoubleTapListener: function(obj, id) {
- var pre = '_leaflet_';
- obj.removeEventListener(obj, obj[pre + 'touchstart' + id], false);
- obj.removeEventListener(obj, obj[pre + 'touchend' + id], false);
- }
-}); \ No newline at end of file