From beb308c5b30b1fedc308bc86bea8b339ad60496c Mon Sep 17 00:00:00 2001 From: rowanfr Date: Sun, 7 Jan 2024 05:56:53 -0600 Subject: [PATCH 1/8] Resolved issue with subgraph configuration This commit resolves the issues with subgraph configuration, specifically for nodeSpacing and rankSpacing. This commit additionally adds an example graph to the `flowchart.html` to demonstrate this resolution. This commit resolves #3258 --- demos/flowchart.html | 24 +++++++++++++++++++++ packages/mermaid/src/dagre-wrapper/index.js | 4 ++++ 2 files changed, 28 insertions(+) diff --git a/demos/flowchart.html b/demos/flowchart.html index d7032a663c..c2e1276fc5 100644 --- a/demos/flowchart.html +++ b/demos/flowchart.html @@ -1540,6 +1540,30 @@

flowchart


+
+      ---
+      title: Subgraph nodeSpacing and rankSpacing example
+      ---
+      %%{init:{'flowchart':{'nodeSpacing': 1, 'rankSpacing':'1'}}}%%
+
+      flowchart LR
+      
+      X --> Y
+      
+      subgraph X
+        direction LR
+        A
+        C
+      end
+      
+      subgraph Y
+        direction LR
+        B
+        D
+      end
+    
+
+

Anchor for "link-clicked" test