[OpenLayers-Commits] r12181 - trunk/openlayers/lib/OpenLayers/Control

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Sat Jul 23 16:12:03 EDT 2011


Author: ahocevar
Date: 2011-07-23 13:12:02 -0700 (Sat, 23 Jul 2011)
New Revision: 12181

Modified:
   trunk/openlayers/lib/OpenLayers/Control/DragFeature.js
Log:
click handling in the DragFeature control only for touch devices. p=jorix, r=me (closes #3428)

Modified: trunk/openlayers/lib/OpenLayers/Control/DragFeature.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Control/DragFeature.js	2011-07-22 21:00:44 UTC (rev 12180)
+++ trunk/openlayers/lib/OpenLayers/Control/DragFeature.js	2011-07-23 20:12:02 UTC (rev 12181)
@@ -171,7 +171,7 @@
      * feature - {<OpenLayers.Feature.Vector>}
      */
     clickFeature: function(feature) {
-        if (!this.over && this.overFeature(feature)) {
+        if (this.handlers.feature.touch && !this.over && this.overFeature(feature)) {
             this.handlers.drag.dragstart(this.handlers.feature.evt);
             // to let the events propagate to the feature handler (click callback)
             this.handlers.drag.stopDown = false;
@@ -186,7 +186,7 @@
      * feature - {<OpenLayers.Feature.Vector>}
      */
     clickoutFeature: function(feature) {
-        if (this.over) {
+        if (this.handlers.feature.touch && this.over) {
             this.outFeature(feature);
             this.handlers.drag.stopDown = true;
         }



More information about the Commits mailing list