-
Notifications
You must be signed in to change notification settings - Fork 712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop the rendered graph from dancing. #379
Conversation
There was some provision for reusing old locations in the code but that never informed the layout engine. So yeah, looks promising! |
Tried it out. Layout is less jumpy with coming/going nodes in the same topology. Switching back and forth between topos still makes different layouts every time. |
@davkal can you run this with? My JS is not so good. |
@tomwilkie sure thing! |
Hmm, caching the layout positions was a non-starter, they are not being passed back to the internal node objects that the graph engine uses, they are not on the whitelist, and even if I patch dagre, they dont seem to inform the layout. I'll try updating to the latest version, and then go for the one-graph-engine-per-topology approach. |
Looks better with one engine per topo. |
LGTM. Will need to regen static.go. |
* one render engine per topology * improves switching back and forth between topos * might increase memory use * roughly fixes #160
Stop the rendered graph from dancing.
I'm not sure this actually works, but I wanted to try it out.
The idea is that instead of doing a fresh layout every time we get a graph update, we cache the layout from last time and mutate that.
Some basic testing implies this works, but I'll try harder to break it tomorrow.
Let me know what you think, @davkal!