Ticket #895: Panel.js.diff
| File Panel.js.diff, 1.2 kB (added by jachym, 1 year ago) |
|---|
-
lib/OpenLayers/Control/Panel.js
old new 120 120 */ 121 121 activateControl: function (control) { 122 122 if (!this.active) { return false; } 123 if (control.type == OpenLayers.Control.TYPE_BUTTON) {124 control.trigger();125 return;126 }127 123 if (control.type == OpenLayers.Control.TYPE_TOGGLE) { 128 124 if (control.active) { 129 125 control.deactivate(); 130 126 } else { 131 127 control.activate(); 132 128 } 129 this.redraw(); 133 130 return; 134 131 } 135 132 for (var i = 0; i < this.controls.length; i++) { 136 133 if (this.controls[i] == control) { 137 control.activate(); 134 if (control.active) { 135 control.deactivate(); 136 } 137 else { 138 control.activate(); 139 } 138 140 } else { 139 141 if (this.controls[i].type != OpenLayers.Control.TYPE_TOGGLE) { 140 142 this.controls[i].deactivate();
