Map should deactivate removed controls, removal of pythonic lack of ';' caught

by elemoine in his review. (Closes #1880)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@8530 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2008-12-21 14:42:41 +00:00
parent 998d03770b
commit 34959835fb
2 changed files with 11 additions and 0 deletions

View File

@@ -1130,6 +1130,7 @@ 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);
}