Permalink gets a destroy method. Fixes #594.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@2935 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Schuyler Erle
2007-03-30 21:58:26 +00:00
parent e1590b2a20
commit 68bf0c0c4c

View File

@@ -32,6 +32,20 @@ OpenLayers.Control.Permalink.prototype =
}
},
/**
*
*/
destroy: function() {
if (this.element.parentNode == this.div) {
this.div.removeChild(this.element);
}
this.element = null;
this.map.events.unregister('moveend', this, this.updateLink);
OpenLayers.Control.prototype.destroy.apply(this, arguments);
},
/** Set the map property for the control.
*
* @param {OpenLayers.Map} map