Pullup r2999:3087 for RC2.

svn merge trunk/openlayers/@2999 trunk/openlayers/@HEAD branches/openlayers/2.4/



git-svn-id: http://svn.openlayers.org/branches/openlayers/2.4@3088 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-04-20 01:10:43 +00:00
parent b6fb16153c
commit b5103eb8ce
58 changed files with 1399 additions and 503 deletions

View File

@@ -83,7 +83,7 @@
coll.addComponents(new OpenLayers.Geometry.Point(10,10));
coll2 = coll.clone();
t.ok( coll2 instanceof OpenLayers.Geometry.Collection, "coll.clone() returns collection object" );
t.eq( coll2.getComponents().length, 2, "coll2.components.length is set correctly");
t.eq( coll2.components.length, 2, "coll2.components.length is set correctly");
t.ok( coll2.components[0] instanceof OpenLayers.Geometry.Point,
"coll2.components.length is set correctly");
}
@@ -95,21 +95,12 @@
coll.addComponents(point);
coll.addComponents(new OpenLayers.Geometry.Point(10,10));
coll.removeComponents(coll.components[0]);
t.eq( coll.getComponents().length, 1, "coll.components.length is smaller after removeComponent" );
t.eq( coll.components.length, 1, "coll.components.length is smaller after removeComponent" );
t.ok( coll.bounds == null, "bounds are nullified after call to remove (to trigger recalc on getBounds()");
bounds = coll.getBounds();
t.eq( bounds.left, 10, "left bound is 10 after removeComponent" );
t.eq( bounds.bottom, 10, "bottom bound is 10 after removeComponent" );
}
function test_05_Collection_getComponents (t) {
t.plan(1);
coll = new OpenLayers.Geometry.Collection();
coll.components = {};
t.eq( coll.getComponents(), coll.components, "getComponents returns great");
}
function test_06_Collection_calculateBounds(t) {
t.plan( 9 );