Hi Pierre, this makes perfect sense to me, and I do something similar in the activateControl function of my custom toolbar [1].
[1] http://pastebin.com/m58897cdf Best regards, Bart > Hi all, > > Looking at the way control are handle this morning, I'm a bit confused > with the different type. > > Currently, here is how we manage control buttons in the Panel control > activateControl method : > - if the activated control is of BUTTON type, we call the button > trigger method, no extra action is done, > - if the activated control is of TOGGLE type, we change activation on > this button, no extra action is done, > - in the other cases, we consider the panel's controls as a group, > and activate/deactivate them all if they are not of TOGGLE type. > > In my opinion, the TOGGLE type implies that the control can have 2 > states "active" and "inactive". It has nothing to do with groups. > We should introduce a new control property "toggleGroup" that would > let the parent panel manage the control groups. > If a button of type TOGGLE is activated and it has no toggleGroup set, > no extra action is done. > If a button of type TOGGLE is activated, the other buttons within the > same toggleGroup will be deactivated. > > Does it make sense ? > I think it's worth putting effort on this in 3.0. > > Regards, > Pierre > _______________________________________________ > Dev mailing list > Dev@openlayers.org > http://openlayers.org/mailman/listinfo/dev > _______________________________________________ Dev mailing list Dev@openlayers.org http://openlayers.org/mailman/listinfo/dev