-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Architecture diagram - different layout rendering each time #6166
Comments
might be a duplicate of #6024 |
After taking a look at the above issue and the one outlined in #6024, the underlying causes are different and should be considered separately. The problem in this scenario is that the parser should technically be throwing an error, despite it looking valid. One of the limitations of the underlying engine used for generating the layouts is that to enforce a clean grid pattern, each node needs to be no more then one "unit" away in X and Y direction. To make it a bit more clear, I changed the 3rd edge from In this case, we'll call The issue lies in that Without using junctions, another way to fix this would be to replace edge 6 with Which now moves Obviously this behavior isn't ideal. Once I have more time I'll re-evaluate the options for layout engines to see if there's anything better but that probably won't happen until early in the summer. In the meantime, I plan to make 2 changes to rectify the above issue:
|
This one is a massive limitation as of now, should be clearly stated in the documentation introduction |
Description
The same
architecture-diagram
mermaid code will render differently on reload/refresh. I would guess the layout engine is non-deterministic somehow. Different versions result in angled lines (non orthogonal routing) and un-aligned arrow heads.Steps to reproduce
...
Screenshots
These are 5 different rendering of the same diagram without change any mermaid syntax
Code Sample
Setup
Suggested Solutions
No response
Additional Context
The best way I found to fix layout is to add a
junction
for a hint on step6
The text was updated successfully, but these errors were encountered: