Hi,
I want to write a custom comparer for TreeLayout. I am looking at [EDIT: removed obsolete sample, read this instead] http://gojs.net/latest/intro/trees.html#CommonTreeLayoutProperties custom TreeLayout comparer sample and trying to figure out what it does. I know that v and w are TreeVertexes, but I can not figure out what index is. Also, what does the return value do and mean?
The comparer that I am trying to write, places nodes that are color1 on top and nodes with color2 on the bottom, the nodes are split up in those two groups by nodes that have links at the top and nodes without links at the bottom. I know how to get the amount of links a node has and its color, but what value would I return?
Thanks in advance for any help.