Forums

Full Version: how to keep nodes fixed after runing for a while
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, I have an other question. In a graph, if there are too much nodes and I set NBodyForce, DragForce and SpringForce to them, they will keep moving and conflicting with each other. I wonder after they run for a while (for example after 10 seconds) and each node is allocated a suitable position, then how I can keep them fixed.

-- Yaxi
Hi!
We encountered this problem in our project too. There are 2 possible solutions which come to my mind. The first one is that you can set every node fixed, so they are not moved by the layout any more. We followed another approach, which limits the time how long the layout-action is running.

ActionList layout= new ActionList(10000);

Hope that helps,
michael
Thanks for your reply. The two approaches you mentioned I have already tried. But my problem is, I still wish some interactive funtionalities running after layout running time over.
Reference URL's