You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for reporting this!
I can confirm that this issue has been previously discussed, notably in issue #2767.
After analyzing the behavior, it seems that Mermaid does not correctly apply the direction attribute inside subgraphs, leading to unexpected layouts.
Issue Overview:
The Mermaid code explicitly declares direction LR for the outer subgraph (zero) and direction TB for the inner subgraphs (aa and bb).
Expected behavior: aa and bb should be positioned side by side within zero, each following a top-to-bottom (TB) layout.
Actual behavior: aa and bb are stacked vertically, ignoring the direction LR of zero.
Possible Solution:
I'll investigate this further and try to implement a fix. From my initial analysis, it looks like the subgraph direction might not be correctly passed to the layout engine. A potential solution could involve ensuring that subgraph directions are explicitly processed before node positioning is calculated.
I will try to implement a fix for this and will post updates here. If you have any insights, test cases, or additional concerns, feel free to share them!
Description
Trying to format my graph with different directions subgraphs: 2 horizontal columns of vertical subgraphs
Expected:
aa
andbb
in 1 line: 1 line with 2 columnsActual:
aa
andbb
in 1 column +bb
at first. Why?Steps to reproduce
Screenshots
Code Sample
Setup
Suggested Solutions
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: