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

OpenLayers trac-20090302 at openlayers.org
Tue Oct 19 13:01:19 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 jorix):

 Replying to [comment:5 ahocevar]:
 > Replying to [comment:4 jorix]:
 > 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.

 Yes it is doing the same with "autoActivate" that when add a control to
 the map. But the map has no the state "active". The panel can be on the
 map without being active.

 There are two premises that the Control.Panel should meet:

  * Turn off the controls to turn off the panel (is true)
  * Do not activate controls if the panel is not active, even when controls
 are added to an inactive panel on the map (now it is true, this ticket
 must not break)

 Therefore the ticket requires a bit of complexity. When a panel adds
 controls to the map is necessary to distinguish whether panel is active;
 and has to do things differently in the two cases. This is the mess.


 (Could simplify a bit the code by:[[BR]]
 {{{c.type = c.type || OpenLayers.Control.TYPE_TOOL;}}} in
 you seem well this on this ticket?)

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

More information about the Trac mailing list