fix refresh of the graph
This change keeps the position of the nodes if we already have them instead of reseting them.
If we'd want to keep the same positions even closing/reopening the window, we can store the nodeData somewhere and pull it back later
Thanks for the PR! I will test it soon and merge it if no problem occurs.
@mathieudutour I am seeing different behavior than I have imagined so need to clarify a few things. Are your changes meant to keep all nodes in the same place if they existed before? Did you test it with changing a file's title?
If yes to both, then it doesn't work for me 😞 . If no – I might be hitting some edge case. Let me know which one is the case here 😄 .
So they keep the same place when you add a file or change its title. It doesn’t when you close the window and reopen it
I mean they don’t keep the exact same position, it just restarts the simulation with the previous position (so they can still spread, etc.)