Make the drag handler tidy up after itself a bit more. This solves the click blocking after shift-drag issue (see #1003).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4400 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -143,9 +143,10 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
|
||||
* {Boolean} Let the event propagate.
|
||||
*/
|
||||
mousedown: function (evt) {
|
||||
var propagate = true;
|
||||
this.dragging = false;
|
||||
if (this.checkModifiers(evt) && OpenLayers.Event.isLeftClick(evt)) {
|
||||
this.started = true;
|
||||
this.dragging = false;
|
||||
this.start = evt.xy;
|
||||
this.last = evt.xy;
|
||||
// TBD replace with CSS classes
|
||||
@@ -159,9 +160,13 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
|
||||
document.onselectstart = function() {return false;}
|
||||
}
|
||||
|
||||
return false;
|
||||
propagate = false;
|
||||
} else {
|
||||
this.started = false;
|
||||
this.start = null;
|
||||
this.last = null;
|
||||
}
|
||||
return true;
|
||||
return propagate;
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user