Control panels should deactivate all non-toggle type controls before activating a new control. r=me (closes #1414)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6443 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -148,14 +148,13 @@ OpenLayers.Control.Panel = OpenLayers.Class(OpenLayers.Control, {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (var i = 0; i < this.controls.length; i++) {
|
for (var i = 0; i < this.controls.length; i++) {
|
||||||
if (this.controls[i] == control) {
|
if (this.controls[i] != control) {
|
||||||
control.activate();
|
|
||||||
} else {
|
|
||||||
if (this.controls[i].type != OpenLayers.Control.TYPE_TOGGLE) {
|
if (this.controls[i].type != OpenLayers.Control.TYPE_TOGGLE) {
|
||||||
this.controls[i].deactivate();
|
this.controls[i].deactivate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
control.activate();
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user