[OpenLayers-Commits] r11787 -
sandbox/cmoullet/openlayers/lib/OpenLayers/Handler
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Wed Mar 30 10:05:14 EDT 2011
Author: cmoullet
Date: 2011-03-30 07:05:13 -0700 (Wed, 30 Mar 2011)
New Revision: 11787
Modified:
sandbox/cmoullet/openlayers/lib/OpenLayers/Handler/Drag.js
Log:
Merge with trunk
Modified: sandbox/cmoullet/openlayers/lib/OpenLayers/Handler/Drag.js
===================================================================
--- sandbox/cmoullet/openlayers/lib/OpenLayers/Handler/Drag.js 2011-03-30 13:55:31 UTC (rev 11786)
+++ sandbox/cmoullet/openlayers/lib/OpenLayers/Handler/Drag.js 2011-03-30 14:05:13 UTC (rev 11787)
@@ -50,6 +50,13 @@
*/
dragging: false,
+ /**
+ * Property: touch
+ * {Boolean} When a touchstart event is fired, touch will be true and all
+ * mouse related listeners will do nothing.
+ */
+ touch: false,
+
/**
* Property: last
* {<OpenLayers.Pixel>} The last pixel location of the drag.
@@ -336,6 +343,17 @@
* {Boolean} Let the event propagate.
*/
touchstart: function(evt) {
+ if (!this.touch) {
+ this.touch = true;
+ // unregister mouse listeners
+ this.map.events.un({
+ mousedown: this.mousedown,
+ mouseup: this.mouseup,
+ mousemove: this.mousemove,
+ click: this.click,
+ scope: this
+ });
+ }
return this.dragstart(evt);
},
More information about the Commits
mailing list