This is not a new question, and I already mentioned solutions that indicated that before restarting the layout, the nodes should have dx dy parameters corresponding to the appropriate values.
I also created a simple block demonstrating this. However, now that I have developed a more complex example here , I am not satisfied with the result.
The reason is that when you click on nodes, new nodes appear off-screen, and the syntax layout is unstable (not very good), however, after all nodes appear at least once, when the nodes behave as desired and appear close toward the center and therefore create minimal layout disruption.
I feel that either this is the best I can expect from d3, or that there is some inconsistency in the data model model of my code.
The code itself is designed to display a smaller subset of the larger graph loaded from JSON. This allows you to navigate a larger chart with one subset at a time. The subsets are centered on the node that was clicked.
timebandit Jun 30 '15 at 1:05 2015-06-30 01:05
source share