OpenLayers OpenLayers

Changeset 6443

Show
Ignore:
Timestamp:
03/06/08 00:22:18 (10 months ago)
Author:
tschaub
Message:

Control panels should deactivate all non-toggle type controls before activating a new control. r=me (closes #1414)

Files:

Legend:

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

    r6172 r6443  
    149149        } 
    150150        for (var i = 0; i < this.controls.length; i++) { 
    151             if (this.controls[i] == control) { 
    152                 control.activate(); 
    153             } else { 
     151            if (this.controls[i] != control) { 
    154152                if (this.controls[i].type != OpenLayers.Control.TYPE_TOGGLE) { 
    155153                    this.controls[i].deactivate(); 
     
    157155            } 
    158156        } 
     157        control.activate(); 
    159158    }, 
    160159