Ticket #1332: Point.js.patch
| File Point.js.patch, 1.2 kB (added by sbenthall, 1 year ago) |
|---|
-
Point.js
old new 151 151 * Finish the geometry and call the "done" callback. 152 152 */ 153 153 finalize: function() { 154 this.layer.renderer.clear(); 155 this.drawing = false; 156 this.mouseDown = false; 157 this.lastDown = null; 158 this.lastUp = null; 159 this.callback("done", [this.geometryClone()]); 160 this.destroyFeature(); 154 this.cleanup("done"); 161 155 }, 162 156 163 157 /** … … 165 159 * Finish the geometry and call the "cancel" callback. 166 160 */ 167 161 cancel: function() { 168 this.layer.renderer.clear(); 169 this.drawing = false; 162 this.cleanup("cancel"); 163 }, 164 165 cleanup: function(callback) { 166 this.layer.eraseFeatures(this.point); 170 167 this.mouseDown = false; 171 168 this.lastDown = null; 172 169 this.lastUp = null; 173 this.callback( "cancel", [this.geometryClone()]);170 this.callback(callback, [this.geometryClone()]); 174 171 this.destroyFeature(); 175 172 },
