#645 - layer.removeFeatures backs through the features array to ensure that all features are removed

git-svn-id: http://svn.openlayers.org/trunk/openlayers@3036 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2007-04-09 15:29:31 +00:00
parent 1603d5a8ba
commit 26925a89f1
2 changed files with 2 additions and 4 deletions

View File

@@ -30,7 +30,7 @@
}
function test_03_Layer_Vector_removeFeatures(t) {
t.plan(1);
t.plan(2);
var layer = new OpenLayers.Layer.Vector(name);
@@ -43,13 +43,11 @@
var features = layer.removeFeatures([pointFeature1]);
t.ok(layer.features.length == 1, "OpenLayers.Layer.Vector.removeFeatures removes a feature from the features array");
/* patch for #645 will include this
layer.addFeatures([pointFeature1.clone(), pointFeature2.clone()]);
var features = layer.removeFeatures(layer.features);
t.ok(layer.features.length == 0,
"OpenLayers.Layer.Vector.removeFeatures(layer.features) removes all feature from the features array");
*/
}
function test_Layer_Vector_addStyle (t) {