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

OpenLayers trac-20090302 at openlayers.org
Thu Sep 23 12:31:17 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:8 ahocevar]:
 > Your ups, ups^2 and ups^4 comments don't make sense to me. Also -
 correct me if I am wrong - I was under the impression that a control won't
 be activated before it is added to the map.

 I explained wrong (I have very clear that control must be activated after
 add it to the map) I understood that you in comment:6 (may be I
 misunderstood) proposed change
 {{{
     control.events.on({
         "activate": this.redraw,
         "deactivate": this.redraw,
         scope: this
     });
 }}}
 to
 {{{
     control.events.on({
         "activate": this.onActivateControl,
         "deactivate": this.onDectivateControl,
         scope: control // "this" to "control"
     });
 }}}
 and "this.onActivateControl" has the logic to ensure that only a
 "TYPE_TOOL" is active (now this is in "activateControl"). The code in the
 second part of my comment:7 would be the end (simplified) of
 "this.onActivateControl" but conditioned by #1414.[[BR]]
 If you do not think otherwise I do not need to go into more details about
 this.

 ----

 Returning to the first part of my reply to your comment:5. I think the
 complexity of this patch is required, for example when a panel with
 "autoActivate" to false is added to the map.[[BR]]
 What is your opinion on this?

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


More information about the Trac mailing list