danielcaldas/react-d3-graph

Initial Positioning issue & Animation Stops working after few moves

shahriarhossain opened this issue · 1 comments

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:

  • OS: Windows
  • Browser: Chrome
  • Node version: 16.7.0
  • react-d3-graph version: ^2.6.0
  • d3 version : 5.5.0
  • react version: 18.2.0

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