react-d3-graph icon indicating copy to clipboard operation
react-d3-graph copied to clipboard

Reset Nodes positions not working by setting nodeHighlightBehavior: true

Open onlyreddy opened this issue 5 years ago • 1 comments

Hi there :),

I started using react-d3-graph for my project and came across an event resetNodePositions for resetting nodes' positions after dragging or moving the nodes.

In your Sandbox demo, it's working but I tried in my project surprisingly it's not working. Then I dug in the code and found that if nodeHighlightBehavior is set to true. Then reset position is not working.

I commented it then it's working. I created a Code sandbox demo also. In the demo, I'm not commented on the nodeHighlightBehaviour.

Can you please fix this issue and I need this feature to work.

Thanks,

onlyreddy avatar Feb 10 '21 03:02 onlyreddy

Hello @onlyreddy ,

This is today a known limitation, please have a look here.

From the documentation : automaticRearrangeAfterDropNode won't work together with nodeHighlightBehavior (currently a known limitation, to be address in the future GitHub issue #261).

antoninklopp avatar Feb 11 '21 17:02 antoninklopp