Giving the drag handler a stopDown property. Set this to true in the constructor options to let mousedown events propagate. r=crschmidt (closes #1247)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5697 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -36,6 +36,13 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
|
|||||||
*/
|
*/
|
||||||
started: false,
|
started: false,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Property: stopDown
|
||||||
|
* {Boolean} Stop propagation of mousedown events from getting to listeners
|
||||||
|
* on the same element. Default is true.
|
||||||
|
*/
|
||||||
|
stopDown: true,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Property: dragging
|
* Property: dragging
|
||||||
* {Boolean}
|
* {Boolean}
|
||||||
@@ -164,7 +171,7 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
|
|||||||
document.onselectstart = function() {return false;};
|
document.onselectstart = function() {return false;};
|
||||||
}
|
}
|
||||||
|
|
||||||
propagate = false;
|
propagate = !this.stopDown;
|
||||||
} else {
|
} else {
|
||||||
this.started = false;
|
this.started = false;
|
||||||
this.start = null;
|
this.start = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user