Cleanup after the Navigation control (at least slightly more)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5891 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -54,6 +54,21 @@ OpenLayers.Control.Navigation = OpenLayers.Class(OpenLayers.Control, {
|
||||
OpenLayers.Control.prototype.initialize.apply(this, arguments);
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: destroy
|
||||
* The destroy method is used to perform any clean up before the control
|
||||
* is dereferenced. Typically this is where event listeners are removed
|
||||
* to prevent memory leaks.
|
||||
*/
|
||||
destroy: function() {
|
||||
OpenLayers.Control.prototype.destroy.apply(this,arguments);
|
||||
this.deactivate();
|
||||
this.dragPan.destroy();
|
||||
this.wheelHandler.destroy();
|
||||
this.clickHandler.destroy();
|
||||
this.zoomBox.destroy();
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: activate
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user