From 5b31ee3c0a40f49644a3f123332ea20f79137bc4 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Wed, 9 Jan 2008 09:50:21 +0000 Subject: [PATCH] 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 --- lib/OpenLayers/Handler/Drag.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Handler/Drag.js b/lib/OpenLayers/Handler/Drag.js index 017f24a7cf..e2c111095d 100644 --- a/lib/OpenLayers/Handler/Drag.js +++ b/lib/OpenLayers/Handler/Drag.js @@ -36,6 +36,13 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, { */ 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 * {Boolean} @@ -164,7 +171,7 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, { document.onselectstart = function() {return false;}; } - propagate = false; + propagate = !this.stopDown; } else { this.started = false; this.start = null;