OpenLayers OpenLayers

Changeset 6163

Show
Ignore:
Timestamp:
02/08/08 23:23:54 (1 year ago)
Author:
crschmidt
Message:

Rollback patch from #1332, which broke feature creation.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Handler/Point.js

    r6154 r6163  
    152152     */ 
    153153    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; 
    167156        this.mouseDown = false; 
    168157        this.lastDown = null; 
    169158        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()]); 
    171174        this.destroyFeature(); 
    172175    },