tisoap / react-flow-smart-edge

Custom Edge for React Flow that never intersects with other nodes
https://tisoap.github.io/react-flow-smart-edge/
MIT License
242 stars 26 forks source link

In version 3.0 Beta - Edge between 2 nodes goes away if the nodes are close to each other #41

Closed DraksBG closed 1 year ago

DraksBG commented 1 year ago

Me and @antipasvasil are collogues and are working on the Beta version. There is a problem when 2 nodes are close to each other - the edge between them goes to a fixed location(at (0, 0) coordinates.

To Reproduce Steps to reproduce the behavior:

  1. Go to any nodes that have connection (Edge) between them
  2. Start dragging one of the node towards the other node that is connected
  3. As they get closer the connection (Edge) has been transferred to 0,0 coordinates

Expected behavior No matter how close any nodes that are connected are getting close the connection should remain between them and not disappear

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information): OS: Windows 10, 11 Browser Chrome, Firefox screen_1 Screen_2

antipasvasil commented 1 year ago

@tisoap i would like once again to thank you of the quick response regarding updaiting vesrion. Exactly as @DraksBG explained, there is a problem when 2 nodes are close to each other. We know how to mask it but it is not good aproache. I will really appreciate if you can help us to handle it. Thank you in advance.

tisoap commented 1 year ago

Hey @DraksBG ! Could you please provide a minimal working example on CodeSandbox? I won't tackle issues where the problem can't be reproduced

tisoap commented 1 year ago

@antipasvasil No problem! I'll warn you in advance: I won't be able to tackle issues in a timely manner, as I'm the sole maintainer with a full time job working on web development. To develop even more after work hours or on weekends is very low on my list of priorities

If you guys have a very pressing issue, I recommend forking this library and implement the fixes on your own, or not using smart edges at all (the default edges on React Flow 11 are a bit smarter by default, so you might not even have a need for this package anymore)