Handler.RegularPolygon doesn't always call the "done" callback, r=tschaub (closes #1857)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@8616 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2009-01-09 09:12:37 +00:00
parent 6724cefe5f
commit 68ad14a047
2 changed files with 40 additions and 0 deletions

View File

@@ -274,6 +274,12 @@ OpenLayers.Handler.RegularPolygon = OpenLayers.Class(OpenLayers.Handler.Drag, {
*/
up: function(evt) {
this.finalize();
// the mouseup method of superclass doesn't call the
// "done" callback if there's been no move between
// down and up
if (this.start == this.last) {
this.callback("done", [evt.xy]);
}
},
/**