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:
@@ -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);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user