Roll back changes from r8530: As Tim points out (See #1880), this breaks many
tests and other aspects of OpenLayers. This patch should not have been committed. For now, revert the change, and then we can discuss a better solution. (Rolling back change without review.) git-svn-id: http://svn.openlayers.org/trunk/openlayers@8548 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -1130,7 +1130,6 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
removeControl: function (control) {
|
||||
//make sure control is non-null and actually part of our map
|
||||
if ( (control) && (control == this.getControl(control.id)) ) {
|
||||
control.deactivate();
|
||||
if (control.div && (control.div.parentNode == this.viewPortDiv)) {
|
||||
this.viewPortDiv.removeChild(control.div);
|
||||
}
|
||||
|
||||
@@ -59,16 +59,6 @@
|
||||
control2.destroy();
|
||||
}
|
||||
|
||||
function test_Control_removeControl(t) {
|
||||
t.plan(1);
|
||||
var map = new OpenLayers.Map('map');
|
||||
var control = new OpenLayers.Control();
|
||||
map.addControl(control);
|
||||
control.deactivate = function() {
|
||||
t.ok(true, "Deactivate is called.");
|
||||
};
|
||||
map.removeControl(control);
|
||||
}
|
||||
function test_Control_destroy(t) {
|
||||
t.plan(3);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user