aboutsummaryrefslogtreecommitdiffstats
path: root/extlib/leaflet/src/dom/DomEvent.DoubleTap.js
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2015-02-14 13:34:41 -0600
committerChristopher Allan Webber <cwebber@dustycloud.org>2015-02-17 15:48:28 -0600
commit9252fc84840220106e696cc2116e7804c9529c5a (patch)
treec1bafe27ad0cac8e4b49bd476ad2e3947fe4fca9 /extlib/leaflet/src/dom/DomEvent.DoubleTap.js
parent572106e23037997db9a4e131029b0a4f7cb969b5 (diff)
downloadmediagoblin-9252fc84840220106e696cc2116e7804c9529c5a.tar.lz
mediagoblin-9252fc84840220106e696cc2116e7804c9529c5a.tar.xz
mediagoblin-9252fc84840220106e696cc2116e7804c9529c5a.zip
Remove extlib deps moved into bower
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