You should change your function to this:
> tree.getRootNode().cascade(function(node){
>    if (!node.childNodes || node.childNodes.length==0) {
>       node.remove();
>    }
> }
>
That would surely remove the leaf nodes as well as empty group nodes? 
The trick is recognize that the node is a group node rather than a layer 
leaf node.

I never thought of a delay. on remove. Will experiment.
-- 
Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St, 
Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232

Notice: This email and any attachments are confidential. If received in error 
please destroy and immediately notify us. Do not copy or disclose the contents.

_______________________________________________
Users mailing list
Users@geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to