Making it so controls that register for mousedown and mouseup work in touch environments. r=crschmidt (closes #3075)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11207 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -155,7 +155,10 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
|
||||
);
|
||||
this.down(evt);
|
||||
this.callback("down", [evt.xy]);
|
||||
OpenLayers.Event.stop(evt);
|
||||
|
||||
if (evt.type === "mousedown") {
|
||||
OpenLayers.Event.stop(evt);
|
||||
}
|
||||
|
||||
if(!this.oldOnselectstart) {
|
||||
this.oldOnselectstart = document.onselectstart ?
|
||||
@@ -201,6 +204,9 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
|
||||
this.interval);
|
||||
}
|
||||
this.dragging = true;
|
||||
if (evt.type === "touchmove") {
|
||||
OpenLayers.Event.stop(evt);
|
||||
}
|
||||
this.move(evt);
|
||||
this.callback("move", [evt.xy]);
|
||||
if(!this.oldOnselectstart) {
|
||||
|
||||
Reference in New Issue
Block a user