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
This commit is contained in:
ahocevar
2011-07-23 20:12:02 +00:00
parent 4caaebf5bc
commit 912c1d5c1b

View File

@@ -171,7 +171,7 @@ OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, {
* 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 @@ OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, {
* 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;
}