[OpenLayers-Trac] Re: [OpenLayers] #2834: Panel control: Allow to use "autoActivate" in the panel's controls.

OpenLayers trac-20090302 at openlayers.org
Tue Sep 21 02:38:23 EDT 2010


#2834: Panel control: Allow to use "autoActivate" in the panel's controls.
---------------------------+------------------------------------------------
 Reporter:  jorix          |       Owner:                 
     Type:  feature        |      Status:  new            
 Priority:  minor          |   Milestone:  2.11 Release   
Component:  Control.Panel  |     Version:  2.10           
 Keywords:                 |       State:  Needs More Work
---------------------------+------------------------------------------------

Comment(by ahocevar):

 Replying to [comment:4 jorix]:
 > Help me to understand the problem, thanks.

 You said yourself: "Note: In the patch small changes are proposed for the
 implementation of #2753 and #2769".

 Now please, ask yourself: what is the whole point of this ticket? In my
 opinion, the behavior when adding a control with autoActivate set to true
 should be the same as if you would add it to the map. Which means the only
 thing you would have to do is clean up the mess in
 Control.Panel.addControlsToMap:
 {{{
             if (control.autoActivate === true) {
                 control.autoActivate = false;
                 this.map.addControl(control);
                 control.autoActivate = true;
             } else {
                 this.map.addControl(control);
                 control.deactivate();
             }
 }}}
 I think this should just be
 {{{
             this.map.addControl(control);
 }}}

-- 
Ticket URL: <http://trac.openlayers.org/ticket/2834#comment:5>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list