additional patch for #742 - removeControl() now takes the control as argument, not the id

git-svn-id: http://svn.openlayers.org/trunk/openlayers@3329 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2007-06-14 19:18:57 +00:00
parent 385da5c614
commit 8874a6069f
2 changed files with 7 additions and 6 deletions

View File

@@ -431,7 +431,7 @@
t.ok(foundDiv, "new control's div correctly added to viewPort");
//remove control
map1.removeControl(control.id)
map1.removeControl(control)
newNumControls = map1.controls.length;
t.ok( newNumControls == oldNumControls, "removing the control decreases control count")
@@ -448,7 +448,8 @@
t.ok(!foundDiv, "control no longer child of viewPort");
//remove bogus
map1.removeControl("bogus id");
control = { id: "bogus id" };
map1.removeControl(control);
newNumControls = map1.controls.length;
t.ok( newNumControls == oldNumControls, "removing bad controlid doesnt crash or decrease control count")
}