Open schloerke opened 6 years ago
looking for the solution to same problem, is there any work around for transition (not to draw entire graph)?
Same issue here as well. I attempted to find where the regression was introduced, but packages are not cooperating.
Also noticed the same issue. I did a quick bisect and here are the results:
4255a0f - (tag: v0.5.0, refs/bisect/bad) Prep v0.5.0 release (7 months ago)
Unfortunately I had to skip some commits as the "interactive demo" demo wouldn't work (create-edge-paths.js:95 Uncaught TypeError: Cannot read property 'getBBox' of undefined
). I'm reasonably sure ebbb84f (the update to D3.js v4) broke it, though.
Looks like some test code was still left in for example: https://github.com/dagrejs/dagre-d3/commit/ebbb84f03bd169061f40d7a1df82cb3b51860187#diff-1d2b4ec6a34c39474f81032fe8451954R17 Is this behavior correct? Also look a few lines above
@HailToDodongo What makes you think it is test code? It does seem odd that upgrading to D3 v4 would require changing how selections are done, but it's not unbelievable either.
Some context: Most of this change is ported from tylingsoft/dagre-d3-renderer@46055d9349c63440dfd694aff3c640d3993cc68b. There was another fork smbolton/dagre-d3v4@78f537785332005b618e087e4226c0267c069ec6. Feel free to compare and submit a PR with a fix.
I believe with the merge of #342 this should now be closed. I would advocate for a new NPM release going out with this fix, as it's pretty significant from a usability perspective.
@agg23 Has this been fixed? The interactive demo on the site still re-renders completely on every change. Also for my project i'm using the minimized link from the wiki which is supposed to be the most recent, and I still have this problem.
Would really appreciate help :)
It has been fixed (at least in my tests), but it has not been pushed to NPM, as I asked above. If you manually install the latest version, you will find that it animates correctly.
I did it and it worked. Thank you.
Current, bad transitions: https://dagrejs.github.io/project/dagre-d3/latest/demo/interactive-demo.html
Add a white line in the text to trigger a render. The whole graph is re-drawn as if it's completely entering, and not transitioning.
Expected behavior: http://www.samsarin.com/project/dagre-d3/latest/demo/interactive-demo.html displays
Can add white lines, remove/add edges, and remove/add nodes with smooth transitions, as expected.