drawdb icon indicating copy to clipboard operation
drawdb copied to clipboard

fix(calcPath.js): improve connector pathing

Open lazuee opened this issue 4 months ago • 6 comments

  • Added safety margin on tableWidth to switch connectors to the opposite side when overlapping.
  • Added padding on tableWidth to ensure a minimum straight segment before the curve.

lazuee avatar Aug 26 '25 08:08 lazuee

@lazuee is attempting to deploy a commit to the dottle's projects Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Aug 26 '25 08:08 vercel[bot]

I still can’t figure out how to stop the line path from passing through the table. What I want is for the path to go above or below the table whenever the tables are vertically aligned. As of now it just overlaps straight through the table.

Here’s a playground of the current calcPath function: https://developer.mozilla.org/en-US/play?id=OjSZbqWhYIxGpWxaVp5xT6TQ3l%2BTauQyOl1495xzAckpbTwEVZmW%2FsrJFJdFGfR%2FRQ4sg73UvZRf2Z%2F%2B

lazuee avatar Aug 26 '25 15:08 lazuee

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
drawdb Ready Ready Preview Comment Aug 27, 2025 4:58pm

vercel[bot] avatar Aug 27 '25 16:08 vercel[bot]

I still can’t figure out how to stop the line path from passing through the table. What I want is for the path to go above or below the table whenever the tables are vertically aligned. As of now it just overlaps straight through the table.

Here’s a playground of the current calcPath function: https://developer.mozilla.org/en-US/play?id=OjSZbqWhYIxGpWxaVp5xT6TQ3l%2BTauQyOl1495xzAckpbTwEVZmW%2FsrJFJdFGfR%2FRQ4sg73UvZRf2Z%2F%2B

is this the case youre talking about? youd have to change the render order for this i guess. but im not sure if the effort for that is worth it

image

also looking at the current implemented version, we get cases like these

image

1ilit avatar Aug 27 '25 17:08 1ilit

I want the line path to be drawn on both opposite sides whenever it horizontally overlaps with the top or bottom of a table, treating the table as an obstacle.

image image image

lazuee avatar Aug 28 '25 03:08 lazuee

current implemented version image image

lazuee avatar Aug 28 '25 03:08 lazuee