diff --git a/lib/OpenLayers/Control/Panel.js b/lib/OpenLayers/Control/Panel.js index 215a4f0c60..b0955426c4 100644 --- a/lib/OpenLayers/Control/Panel.js +++ b/lib/OpenLayers/Control/Panel.js @@ -46,6 +46,14 @@ OpenLayers.Control.Panel = OpenLayers.Class(OpenLayers.Control, { */ saveState: false, + /** + * APIProperty: allowDepress + * {Boolean} If is true the controls can + * be deactivated by clicking the icon that represents them. Default + * is false. + */ + allowDepress: false, + /** * Property: activeState * {Object} stores the active state of this panel's controls. @@ -199,15 +207,19 @@ OpenLayers.Control.Panel = OpenLayers.Class(OpenLayers.Control, { } return; } - var c; - for (var i=0, len=this.controls.length; i