Open itpwuwei opened 5 years ago
Using network.storePositions()
will put the X and Y positions of all nodes into the dataset.
That way whenever the network is redrawn the nodes will stay in place.
If your layout is not hierarchical, the randomSeed
option prevents the shape to change... with no need to store the positions. Of course, this solution will not keep the shape unchanged if new nodes are added or if nodes are removed from the graph.
Every time you update the "network" shape always changes, how can you make the shape unchanged?