philogb / jit

The JavaScript InfoVis Toolkit provides tools for creating Interactive Data Visualizations for the Web
http://thejit.org
Other
1.51k stars 297 forks source link

Spacetree moves parent node to childlevel when clicking on childnode (selectionmode - Set as Root) #123

Closed AlexRegenbogen closed 12 years ago

AlexRegenbogen commented 12 years ago

I'm trying to incorporate JIT into our application to spruce up our organizational charts, and make them interactive.

Starting with the Spacetree as a jumping board, I modified the example to fit my needs. (http://thejit.org/static/v20/Jit/Examples/Spacetree/example1.html)

If you switch the selection mode to Set as Root, you'll see that when you select a child-node from the root, that after clicking the (former) root becomes a child, which to me does not make sense, since it's the parent....

Steps to reproduce this:

0.2 now becomes a child of 1.65, on the same level as 2.66, 2.83, 2.104, 2.109 and 2.125...

Is this explainable behaviour, our have i stumbled upon something here? ;-)

wilsonwc commented 12 years ago

This is the desired behavior. Basically setting the selection mode to root means that you are just graphing the relationships, and those relationships are no longer directional.

philogb commented 12 years ago

@wilsonwc is right.