Keeping a reference to the event pane when a layer is removed from the map. The pane is set in initialize and set to null in destroy. r=ahocevar (closes #2456)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@10013 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2010-02-03 16:28:29 +00:00
parent ec455e81e1
commit af1e754546
2 changed files with 41 additions and 3 deletions

View File

@@ -80,6 +80,7 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, {
*/
destroy: function() {
this.mapObject = null;
this.pane = null;
OpenLayers.Layer.prototype.destroy.apply(this, arguments);
},
@@ -131,7 +132,6 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, {
removeMap: function(map) {
if (this.pane && this.pane.parentNode) {
this.pane.parentNode.removeChild(this.pane);
this.pane = null;
}
OpenLayers.Layer.prototype.removeMap.apply(this, arguments);
},