You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
centerNodeOnMove not working right when it is False #324
Thank lots for all the hard work. It really is a great library.
I would like to report a bug here:
After I updated the library to version 7.1.0, I got the bug that when I set centerNodeOnMove= false, the node does not move as it should.
So I switched back to V 7.0.0 to solve the problem ... but now when I select a node and click backspace while writing in input, the selected node is directly deleted ... so is there any way to turn off this event in version 7.0.0 using ref?
Otherwise, it would be nice if someone could solve the problem.
Hint:
I have tried all versions after 7.0.0 and I get the same error that the node is moved incorrectly when centerNodeOnMove= false
Activity
AhmadYoussef commentedon Aug 9, 2021
I did today a debug to the code and I found out that this line is rendering while the node is moving
react-digraph/src/components/node.js
Line 117 in 1ab55aa
so it will rewrite the pointerOffset. so I decided to remove the assigned value and move it to useRef in this line
react-digraph/src/components/node.js
Line 112 in 1ab55aa
and I made it like this :
but I am not sure if this will not work correctly with another function ... but I test it and it looks fine.
I hope you will fix the problem in the next version.