From 912c1d5c1bc51ebce640b48479922b5d91d32364 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Sat, 23 Jul 2011 20:12:02 +0000 Subject: [PATCH] click handling in the DragFeature control only for touch devices. p=jorix, r=me (closes #3428) git-svn-id: http://svn.openlayers.org/trunk/openlayers@12181 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Control/DragFeature.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Control/DragFeature.js b/lib/OpenLayers/Control/DragFeature.js index ff8084d336..012ac76142 100644 --- a/lib/OpenLayers/Control/DragFeature.js +++ b/lib/OpenLayers/Control/DragFeature.js @@ -171,7 +171,7 @@ OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, { * feature - {} */ 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 @@ OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, { * feature - {} */ clickoutFeature: function(feature) { - if (this.over) { + if (this.handlers.feature.touch && this.over) { this.outFeature(feature); this.handlers.drag.stopDown = true; }