Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BezierConnector overcompensates if its length is close to or less than its curviness #78

Open
Domiii opened this issue May 14, 2022 · 1 comment

Comments

@Domiii
Copy link

Domiii commented May 14, 2022

Can you change the Bezier algorithm to use Straight instead once edge length gets close to or less than curviness? Maybe in form of some straightThreshold option?

Here are some examples of how Bezier gets really messy once edge length gets short.

In the first example, the two nodes have a distance of about 2 x curviness, second 1 x curviness, third .5 x curviness:

image image image

For reference: "Curved Connectors" in Google Slides straighten out when the connecting surfaces have a very low relative angle. That is also ok, but maybe harder to implement? (Also, it bugs out with non-rectangular shapes, where connectors come in at a too low angle.)

@Domiii Domiii changed the title BezierConnector overcompensates if its length is close to or less than its curviness BezierConnector overcompensates if its length is close to or less than its curviness May 14, 2022
@sporritt
Copy link
Member

this reminds me of this PR that seems pretty cool but for some reason never got merged

jsplumb/jsplumb#41

it's too late to merge that in now as the codebase is completely different, but perhaps the idea could be implemented in the current codebase.

@sporritt sporritt transferred this issue from jsplumb/jsplumb Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants