Arrange elements so we can get mouse events on controls while preventing the default (scroll) behavior on touch devices. r=elemoine (closes #3091)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@11365 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2011-02-23 17:59:37 +00:00
parent 0961132ab6
commit fa32a4a645
5 changed files with 44 additions and 32 deletions

View File

@@ -156,9 +156,7 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
this.down(evt);
this.callback("down", [evt.xy]);
if (evt.type === "mousedown") {
OpenLayers.Event.stop(evt);
}
OpenLayers.Event.stop(evt);
if(!this.oldOnselectstart) {
this.oldOnselectstart = document.onselectstart ?
@@ -204,9 +202,7 @@ 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) {