OpenLayers OpenLayers

Changeset 3207

Show
Ignore:
Timestamp:
05/30/07 09:51:28 (1 year ago)
Author:
crschmidt
Message:

Add patch for #726 for TOGGLE controls to control panels (patch from
Andreas Hocevar).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Control/Panel.js

    r3106 r3207  
    104104            control.trigger(); 
    105105            return; 
    106         }      
     106        } 
     107        if (control.type == OpenLayers.Control.TYPE_TOGGLE) { 
     108            if (control.active) { 
     109                control.deactivate(); 
     110            } else { 
     111                control.activate(); 
     112            } 
     113            return; 
     114        } 
    107115        for (var i = 0; i < this.controls.length; i++) { 
    108116            if (this.controls[i] == control) {