drawdb
drawdb copied to clipboard
[FEATURE] Improve relationship line routing
Is your feature request related to a problem? Please describe. Currently, relationship lines can overlap with tables, making the diagram harder to read.
Describe the solution you'd like
- Add a safety margin around tables. When the dragged startTable/endTable touches this margin, the connector should switch to the opposite side of the target table (not the dragged one). The safety margin should also ensure that lines do not pass through the margin; instead, they should route around it unless they are connecting directly to the table.
- Improve pathfinding logic so relationship lines avoid overlapping with tables or other connectors (e.g., temporarily store existing paths and check for collisions before finalizing a new one).
- Implement shortest path calculation to reduce unnecessarily long or awkward straight lines.
I have submitted the changes for this issue in the feature/improve-relationship-routing branch. Please review and provide feedback. Thank you!