give the navigation control a proper destroy and also give it a test file while we're at it. (Closes #1289)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5990 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -62,11 +62,28 @@ OpenLayers.Control.Navigation = OpenLayers.Class(OpenLayers.Control, {
|
||||
*/
|
||||
destroy: function() {
|
||||
OpenLayers.Control.prototype.destroy.apply(this,arguments);
|
||||
|
||||
this.deactivate();
|
||||
this.dragPan.destroy();
|
||||
this.wheelHandler.destroy();
|
||||
this.clickHandler.destroy();
|
||||
this.zoomBox.destroy();
|
||||
|
||||
if (this.dragPan) {
|
||||
this.dragPan.destroy();
|
||||
}
|
||||
this.dragPan = null;
|
||||
|
||||
if (this.wheelHandler) {
|
||||
this.wheelHandler.destroy();
|
||||
}
|
||||
this.wheelHandler = null;
|
||||
|
||||
if (this.clickHandler) {
|
||||
this.clickHandler.destroy();
|
||||
}
|
||||
this.clickHandler = null;
|
||||
|
||||
if (this.zoomBox) {
|
||||
this.zoomBox.destroy();
|
||||
}
|
||||
this.zoomBox = null;
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user