Fix for getFeatureFromEvent method on destroyed layer. (Closes #761) Review

by elem (yay)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4220 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-09-11 20:19:35 +00:00
parent 65f6830448
commit d0aebc1a81
2 changed files with 6 additions and 1 deletions

View File

@@ -148,12 +148,13 @@
}
function test_99_Layer_Vector_destroy (t) {
t.plan(1);
t.plan(2);
layer = new OpenLayers.Layer.Vector(name);
var map = new OpenLayers.Map('map');
map.addLayer(layer);
layer.destroy();
t.eq(layer.map, null, "layer.map is null after destroy");
t.eq(layer.getFeatureFromEvent({'target':'map'}), null, "getFeatureIdFromEvent doesn't cause an error when called on layer which has been destroyed.");
}
function test_Layer_Vector_externalGraphic(t) {