From 6553f9895af1964bfd2b93c28055c0a22e34e256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Tue, 27 May 2008 07:53:48 +0000 Subject: [PATCH] Layer.Vector should destroy itself before its parent, r=fredj (closes #1536) git-svn-id: http://svn.openlayers.org/trunk/openlayers@7276 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Layer/Vector.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/OpenLayers/Layer/Vector.js b/lib/OpenLayers/Layer/Vector.js index 4ede7dcbc8..1c130cd0b9 100644 --- a/lib/OpenLayers/Layer/Vector.js +++ b/lib/OpenLayers/Layer/Vector.js @@ -191,8 +191,6 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { * Destroy this layer */ destroy: function() { - OpenLayers.Layer.prototype.destroy.apply(this, arguments); - this.destroyFeatures(); this.features = null; this.selectedFeatures = null; @@ -202,6 +200,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { this.renderer = null; this.geometryType = null; this.drawn = null; + OpenLayers.Layer.prototype.destroy.apply(this, arguments); }, /**