Rollback patch from #1332, which broke feature creation.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6163 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -151,7 +151,13 @@ OpenLayers.Handler.Point = OpenLayers.Class(OpenLayers.Handler, {
|
|||||||
* Finish the geometry and call the "done" callback.
|
* Finish the geometry and call the "done" callback.
|
||||||
*/
|
*/
|
||||||
finalize: function() {
|
finalize: function() {
|
||||||
this.cleanup("done");
|
this.layer.renderer.clear();
|
||||||
|
this.drawing = false;
|
||||||
|
this.mouseDown = false;
|
||||||
|
this.lastDown = null;
|
||||||
|
this.lastUp = null;
|
||||||
|
this.callback("done", [this.geometryClone()]);
|
||||||
|
this.destroyFeature();
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -159,15 +165,12 @@ OpenLayers.Handler.Point = OpenLayers.Class(OpenLayers.Handler, {
|
|||||||
* Finish the geometry and call the "cancel" callback.
|
* Finish the geometry and call the "cancel" callback.
|
||||||
*/
|
*/
|
||||||
cancel: function() {
|
cancel: function() {
|
||||||
this.cleanup("cancel");
|
this.layer.renderer.clear();
|
||||||
},
|
this.drawing = false;
|
||||||
|
|
||||||
cleanup: function(callback) {
|
|
||||||
this.layer.eraseFeatures(this.point);
|
|
||||||
this.mouseDown = false;
|
this.mouseDown = false;
|
||||||
this.lastDown = null;
|
this.lastDown = null;
|
||||||
this.lastUp = null;
|
this.lastUp = null;
|
||||||
this.callback(callback, [this.geometryClone()]);
|
this.callback("cancel", [this.geometryClone()]);
|
||||||
this.destroyFeature();
|
this.destroyFeature();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user