FlpTree 2.0: Better, faster, open-source!
On May 23, 2010, Components,Flex - 4 CommentsToday I’m releasing a new version of my Tree. Most parts are rewritten for way better performance.
This tree is a replacement for the standard flex tree, which is buggy, slow and not very customizable. With version 2.0, you have full control of the source, so you can tweak it to your needs. It has all the functionalities of the 1.4 version, but some of the stylenames have got another name to match the general stylenames of flex (eg. selectionColor), see the docs for that.
Usage:
<tree:FlpTree x="100" y="100" open="_openCheck(event)" close="_openCheck(event)" width="250" height="400" openNodeOnHover="true" hoverDelay="150" dataProvider="{adata}" borderColor="#000000" borderStyle="solid" borderThickness="1" /> |
If you find a bug in the source, please leave a comment to let me know!
Here’s what you’ll need:
- The source
- The compiled source (swc)
- The docs
Have fun!
Note: This component is written for Flex 3, it’s not tested on Flex 2 nor Flex 4!
What others have to say:
[...] http://labs.flexperiments.nl/flptree-2-0-better-faster-open-source/ [...]
I have not figure out yet how you would cycle through (and retrieve the values from) the children of any individual node.
Any help would be greatly appreciated.
node.data holds the actual data, so the values of the children reside in node.data[your childrenfield], which should be an arraycollection.
Currently, theres no ‘getChildNodes’ method, which would be useful and will be included in the next release.
If you have objects that have a children array collection but have no children it still displays the +. The following mod fixes it in item renderer:
open_close_img.visible = _data.hasOwnProperty(node.tree.childrenField) && _data[node.tree.childrenField]!=null;
Leave a Reply