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

Node dragging animations

Open onlyreddy opened this issue 4 years ago • 2 comments

Hi,

I started using your package in my product and I felt something is missing with the animations.

If you consider the d3-force-directed graph it's providing nice animation for nodes drag, if I drag one node then automatically all the nodes are moving with respect to the node.

Demo link for d3-force-directed

I tried with automaticRearrangeAfterDropNode: true also by disabling nodeHighlightBehavior but still, I can't get that effect.

Did I missed anything, can you please help me out on this.

Thanks, Mahesh Reddy

onlyreddy avatar Feb 16 '21 10:02 onlyreddy

Hi @onlyreddy ,

I think that you could use update callbacks like onNodePositionChange to change the position of connected nodes according to one node position change. I don't really think that this is something that react-d3-graph should provide out of the box since it seems really specific.

What do you think?

antoninklopp avatar Feb 27 '21 21:02 antoninklopp

It would be a nice experience enhancement tough to provide this force animations out of the box when clients set nodeHighlightBehavior to true.

danielcaldas avatar Mar 18 '21 11:03 danielcaldas