[Users] How to get unrendered child nodes
Alexandre Dube
adube at mapgears.com
Wed Dec 8 14:22:21 CET 2010
Hi Alessandro,
Thanks for your feedback. I wrote down your comments and should look
at them in the following days.
Thanks again,
Alexandre
On 10-12-08 04:38 AM, Alessandro Pasotti wrote:
> 2010/12/7 Alexandre Dube <adube at mapgears.com <mailto:adube at mapgears.com>>
>
> There you go :
> http://dev.geoext.org/sandbox/mapgears/geoext.ux/ux/LayerTreeBuilder/examples/tree-builder.html
>
> Only added nodes are currently managed. I still need to do some work
> for the removed nodes.
>
>
>
> Hi,
>
> thanks for sharing this useful component!!
>
> I'm also working on a similar tree, I tested yours but since I use a
> lot of GeoExt "magic" (a layer store and no explicit calls to map),
> the tree is not automatically populated because the layerStore add
> event takes place before the tree itself exists.
>
> I had to add a listener to the tree, I'm not sure it is the preferred
> method, but maybe you want to add it to the code:
>
> // ABP: make sure tree is populated
> onAfterRender : function(self){
> // ABP: what if the store was already populated but the tree
> is empty?
> if(! this.root.childNodes.length && this.layerStore.getRange() ){
> this.onLayerAdded(this.layerStore,
> this.layerStore.getRange(), 0);
> }
> },
> ... and in initComponent
> // ABP: add event handler
> this.on('afterrender', this.onAfterRender);
>
>
> Another issue is with the checkboxes, it seems like unchecking a
> children, unchecks the whole tree (upwards) even if a sibling is still
> checked.
>
> The best option would be to have a tristate checkbox for partially
> checked subtrees.
>
>
> --
> Alessandro Pasotti
> w3: www.itopen.it <http://www.itopen.it>
--
Alexandre Dubé
Mapgears
www.mapgears.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20101208/1495fc20/attachment.htm
More information about the Users
mailing list