better cleanup for ZoomBar and PanZoomBar. Fixes a memory leak.

r=crschmidt (closes #1949)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@9113 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2009-03-21 20:13:26 +00:00
parent 65e4ce3e47
commit 7130992b16
4 changed files with 83 additions and 20 deletions

View File

@@ -30,6 +30,16 @@
map.addControl(control2, new OpenLayers.Pixel(100,100));
t.eq( control2.div.style.top, "100px", "2nd control div is located correctly");
}
function test_Control_PanZoom_removeButtons(t) {
t.plan(2);
map = new OpenLayers.Map("map");
control = new OpenLayers.Control.PanZoom();
map.addControl(control);
control.removeButtons();
t.eq(control.buttons.length, 0, "buttons array cleared correctly");
t.eq(contrl.div.childNodes.length, 0, "control div is empty");
}
function test_Control_PanZoom_control_events (t) {