danielcaldas / react-d3-graph

Interactive and configurable graphs with react and d3 effortlessly
https://danielcaldas.github.io/react-d3-graph/sandbox/
MIT License
819 stars 233 forks source link

Initial Positioning issue & Animation Stops working after few moves #553

Open shahriarhossain opened 1 year ago

shahriarhossain commented 1 year ago

Describe the bug Issue 1: Whenever we start the project, nodes and links are not in the middle, I have to explicitly call the reset node to bring things in the middle. One possible solution is to call the reset functionality within a useEffect which will solve this issue. But I am just wondering if there is any other solution.

Issue 2: After disabling the nodeHighlightBehavior, I can see the animation. If you move one node, other nodes move expectedly. However, whenever you drag a node, it seems it gets a static position and after that, it does not move from that position.

Check the following gif to see the issues I mentioned above. Screenshots Recording 2023-01-16 at 19 59 37

Environment:

shahriarhossain commented 1 year ago

Issue 2 visualization: As you can see in the following gif, once the SpiderMan node gets a position, after that it does not participate in any animation.
Recording 2023-01-16 at 20 50 08

Expected: SpiderMan node will keep moving when other nodes come closer.

can you please guide me @danielcaldas @LonelyPrincess