Skip to content

Commit

Permalink
click handling in the DragFeature control only for touch devices. p=j…
Browse files Browse the repository at this point in the history
…orix, r=me (closes #3428)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@12181 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
  • Loading branch information
ahocevar committed Jul 23, 2011
1 parent 4caaebf commit 912c1d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/OpenLayers/Control/DragFeature.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down

0 comments on commit 912c1d5

Please sign in to comment.