[Pkg-javascript-commits] [leaflet] 144/301: The drag click avoid hack is needed for touch zooms on ie10 also, when releasing your fingers after a touch zoom click events are generated. Fixes #2094

Jonas Smedegaard js at moszumanska.debian.org
Mon Jan 27 22:22:47 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository leaflet.

commit 6855e7dfd84a9bf2064a678458e6692a39d1bb65
Author: danzel <danzel at localhost.geek.nz>
Date:   Wed Oct 23 16:28:56 2013 +1300

    The drag click avoid hack is needed for touch zooms on ie10 also, when releasing your fingers after a touch zoom click events are generated. Fixes #2094
---
 src/dom/Draggable.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/dom/Draggable.js b/src/dom/Draggable.js
index 03304f1..a77cbdf 100644
--- a/src/dom/Draggable.js
+++ b/src/dom/Draggable.js
@@ -78,7 +78,10 @@ L.Draggable = L.Class.extend({
 	},
 
 	_onMove: function (e) {
-		if (e.touches && e.touches.length > 1) { return; }
+		if (e.touches && e.touches.length > 1) {
+			this._moved = true;
+			return;
+		}
 
 		var first = (e.touches && e.touches.length === 1 ? e.touches[0] : e),
 		    newPoint = new L.Point(first.clientX, first.clientY),

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet.git



More information about the Pkg-javascript-commits mailing list