Add patch for #726 for TOGGLE controls to control panels (patch from
Andreas Hocevar). git-svn-id: http://svn.openlayers.org/trunk/openlayers@3207 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -104,6 +104,14 @@ OpenLayers.Control.Panel.prototype =
|
|||||||
control.trigger();
|
control.trigger();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (control.type == OpenLayers.Control.TYPE_TOGGLE) {
|
||||||
|
if (control.active) {
|
||||||
|
control.deactivate();
|
||||||
|
} else {
|
||||||
|
control.activate();
|
||||||
|
}
|
||||||
|
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();
|
control.activate();
|
||||||
|
|||||||
Reference in New Issue
Block a user