Changeset 6163
- Timestamp:
- 02/08/08 23:23:54 (1 year ago)
- Files:
-
- trunk/openlayers/lib/OpenLayers/Handler/Point.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Handler/Point.js
r6154 r6163 152 152 */ 153 153 finalize: function() { 154 this.cleanup("done"); 155 }, 156 157 /** 158 * APIMethod: cancel 159 * Finish the geometry and call the "cancel" callback. 160 */ 161 cancel: function() { 162 this.cleanup("cancel"); 163 }, 164 165 cleanup: function(callback) { 166 this.layer.eraseFeatures(this.point); 154 this.layer.renderer.clear(); 155 this.drawing = false; 167 156 this.mouseDown = false; 168 157 this.lastDown = null; 169 158 this.lastUp = null; 170 this.callback(callback, [this.geometryClone()]); 159 this.callback("done", [this.geometryClone()]); 160 this.destroyFeature(); 161 }, 162 163 /** 164 * APIMethod: cancel 165 * Finish the geometry and call the "cancel" callback. 166 */ 167 cancel: function() { 168 this.layer.renderer.clear(); 169 this.drawing = false; 170 this.mouseDown = false; 171 this.lastDown = null; 172 this.lastUp = null; 173 this.callback("cancel", [this.geometryClone()]); 171 174 this.destroyFeature(); 172 175 },
