From 0f47f1d73f2bc1752662f9bb05b726e749294caa Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Sat, 7 Jul 2007 00:09:22 +0000 Subject: [PATCH] #812 - give drag handler a done callback git-svn-id: http://svn.openlayers.org/trunk/openlayers@3641 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Handler/Drag.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Handler/Drag.js b/lib/OpenLayers/Handler/Drag.js index 30ff3dea3d..e42478f5e8 100644 --- a/lib/OpenLayers/Handler/Drag.js +++ b/lib/OpenLayers/Handler/Drag.js @@ -46,7 +46,10 @@ OpenLayers.Handler.Drag.prototype = * callbacks - {Object} An object containing a single function to be * called when the drag operation is finished. * The callback should expect to recieve a single - * argument, the point geometry. + * argument, the pixel location of the event. + * Callbacks for 'move' and 'done' are supported. + * You can also speficy callbacks for 'down', 'up', + * and 'out' to respond to those events. * options - {Object} */ initialize: function(control, callbacks, options) { @@ -112,6 +115,7 @@ OpenLayers.Handler.Drag.prototype = // TBD replace with CSS classes this.map.div.style.cursor = ""; this.callback("up", [evt.xy]); + this.callback("done", [evt.xy]); document.onselectstart = this.oldOnselectstart; } return true; @@ -136,6 +140,7 @@ OpenLayers.Handler.Drag.prototype = if(document.onselectstart) { document.onselectstart = this.oldOnselectstart; } + this.callback("done", [evt.xy]) } return true; },