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

Can support middle-to-middle anchor arrow layout when using other anchor point? #119

Open
marcocheungkami opened this issue Nov 12, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@marcocheungkami
Copy link

Currently, I find only using a middle-to-middle anchor position can form the shortest length of the arrow line.
e.g. middle-to-middle
image
However, I do not want the arrow to get into my node. If I am using another anchor point even when noCurves prop., I am getting some straight lines with angles.
image
Is it possible to use different anchor points with a middle-to-middle anchor layout?

@pierpo
Copy link
Owner

pierpo commented Nov 12, 2020

Hi, thanks for reporting 😊

If I got it correctly, you'd expect the first behaviour with arrows stopping on the corners of your element ?

I wish this was the case right (because "middle" is quite ugly) but as noted in the doc this is the behaviour we achieved the most simply, and making it look like you want will be quite hard 😞

In the README:
image

It's definitely possible, but I have no ETA yet. If you're interested, you can dive in the code of the lib (it's not too hard) and try to implement it yourself. I'll gladly receive a PR 😉

@marcocheungkami
Copy link
Author

@pierpo thanks for your comment! I can make it myself. However, I am a junior level programmer that I might not be capable of writing perfect code. Would you mind to double-check for me?

@pierpo
Copy link
Owner

pierpo commented Nov 16, 2020

@pierpo thanks for your comment! I can make it myself. However, I am a junior level programmer that I might not be capable of writing perfect code. Would you mind to double-check for me?

Of course 😉

@marcocheungkami
Copy link
Author

Hello @pierpo, any update for my new commit? thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants