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

Is there a way to resolve the overlapping arrows? #1831

Closed
peinan opened this issue Feb 9, 2024 · 3 comments
Closed

Is there a way to resolve the overlapping arrows? #1831

peinan opened this issue Feb 9, 2024 · 3 comments

Comments

@peinan
Copy link

peinan commented Feb 9, 2024

I don't know why this happens, but I want the arrow coming from the right to work like the red line.

image
@cyborg-ts cyborg-ts added this to D2 Feb 9, 2024
@alixander
Copy link
Collaborator

This is probably just the layout engine's choice that we can't do anything about, but can you post the code so I can investigate?

@bo-ku-ra
Copy link
Contributor

bo-ku-ra commented Feb 9, 2024

i think it is possible.

--japanese--
経験的に、その接続に問題がある各ノードが初めて出現する順番や、エッジの順番を変えると回避できます。
c.f.

a
b
c
d
a->b
c->d
b->a

b ←ノードの順番を変えてみる
a
c
d
b->a ←エッジの順番を変えてみる
a->b
c->d

@peinan
Copy link
Author

peinan commented Feb 11, 2024

Thanks for your comment!
The original code has many (400+) lines which are not easy to debug as @bo-ku-ra said. It is also a bit difficult to share because it contains some personal information. Still, I'm very grateful for trying to help.
Personally, I prefer d2lang's syntax to mermaid's because it is intuitive and well designed. However, I am aware that the inflexibility of the layout is a common problem in code-to-diagram, and I hope there is a better solution.

@peinan peinan closed this as completed Feb 11, 2024
@github-project-automation github-project-automation bot moved this to Done in D2 Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

3 participants