OpenLayers OpenLayers

Changeset 5891

Show
Ignore:
Timestamp:
01/24/08 20:35:34 (1 year ago)
Author:
crschmidt
Message:

Cleanup after the Navigation control (at least slightly more)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Control/Navigation.js

    r5614 r5891  
    5555    }, 
    5656 
     57    /** 
     58     * Method: destroy 
     59     * The destroy method is used to perform any clean up before the control 
     60     * is dereferenced.  Typically this is where event listeners are removed 
     61     * to prevent memory leaks. 
     62     */ 
     63    destroy: function() { 
     64        OpenLayers.Control.prototype.destroy.apply(this,arguments); 
     65        this.deactivate(); 
     66        this.dragPan.destroy(); 
     67        this.wheelHandler.destroy(); 
     68        this.clickHandler.destroy(); 
     69        this.zoomBox.destroy(); 
     70    }, 
     71     
    5772    /** 
    5873     * Method: activate