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:
@@ -171,7 +171,7 @@ OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, {
|
|||||||
* feature - {<OpenLayers.Feature.Vector>}
|
* feature - {<OpenLayers.Feature.Vector>}
|
||||||
*/
|
*/
|
||||||
clickFeature: function(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);
|
this.handlers.drag.dragstart(this.handlers.feature.evt);
|
||||||
// to let the events propagate to the feature handler (click callback)
|
// to let the events propagate to the feature handler (click callback)
|
||||||
this.handlers.drag.stopDown = false;
|
this.handlers.drag.stopDown = false;
|
||||||
@@ -186,7 +186,7 @@ OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, {
|
|||||||
* feature - {<OpenLayers.Feature.Vector>}
|
* feature - {<OpenLayers.Feature.Vector>}
|
||||||
*/
|
*/
|
||||||
clickoutFeature: function(feature) {
|
clickoutFeature: function(feature) {
|
||||||
if (this.over) {
|
if (this.handlers.feature.touch && this.over) {
|
||||||
this.outFeature(feature);
|
this.outFeature(feature);
|
||||||
this.handlers.drag.stopDown = true;
|
this.handlers.drag.stopDown = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user