#812 - give drag handler a done callback

git-svn-id: http://svn.openlayers.org/trunk/openlayers@3641 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2007-07-07 00:09:22 +00:00
parent af8cce4f7b
commit 0f47f1d73f

View File

@@ -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;
},