drag, rotate, resize, and reshape with the ModifyFeature control - thanks pvalsecc and elemoine for the inspiration, tests, and code - good partenering with you guys (closes #1150).

git-svn-id: http://svn.openlayers.org/trunk/openlayers@5301 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2007-11-30 17:09:23 +00:00
parent 600435ad21
commit 10cf5bfefc
5 changed files with 255 additions and 29 deletions

View File

@@ -130,7 +130,7 @@
}
function test_Layer_Vector_destroyFeatures (t) {
t.plan(3);
t.plan(5);
layer = new OpenLayers.Layer.Vector(name);
var map = new OpenLayers.Map('map');
map.addLayer(layer);
@@ -145,6 +145,17 @@
layer.destroyFeatures();
t.eq(layer.features.length, 0, "destroyFeatures triggers removal");
t.eq(layer.selectedFeatures, [], "Destroy features removes selected features");
features = [];
for (var i = 0; i < 5; i++) {
features.push(new OpenLayers.Feature.Vector(
new OpenLayers.Geometry.Point(0,0)));
}
layer.addFeatures(features);
layer.selectedFeatures.push(features[0]);
layer.selectedFeatures.push(features[1]);
layer.destroyFeatures([features[0], features[1]]);
t.eq(layer.features.length, 3, "destroyFeatures removes appropriate features");
t.eq(layer.selectedFeatures, [], "destroyFeatures removes appropriate selected features");
}
function test_99_Layer_Vector_destroy (t) {