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:
@@ -103,7 +103,15 @@ OpenLayers.Control.Panel.prototype =
|
||||
if (control.type == OpenLayers.Control.TYPE_BUTTON) {
|
||||
control.trigger();
|
||||
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++) {
|
||||
if (this.controls[i] == control) {
|
||||
control.activate();
|
||||
|
||||
Reference in New Issue
Block a user