[Users] How to share actions between multiple layers?
Eric Lemoine
eric.lemoine at camptocamp.com
Mon May 10 10:14:13 CEST 2010
On Mon, May 10, 2010 at 9:03 AM, Adam Ratcliffe <adam at prema.co.nz> wrote:
> I've taken the approach of creating an Ext.ButtonGroup that contains
> my layer-specific actions which I add to the MapPanel toolbar. I store
> a reference to this button group on the layer object. When an item is
> selected in the map legend (Ext.TreePanel) I remove the ButtonGroup
> for the old layer (if it added one) and add the ButtonGroup for the
> newly selected layer. I found that I needed to pass autoDestroy =
> false to the Ext.Toolbar.remove() function and hide the removed
> ButtonGroup manually in order to be able to re-use the component when
> its layer was re-selected.
Sounds good to me. Thanks for the feedback on that.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com
More information about the Users
mailing list