From 023f2354cdd659fc9827a567342ded4ed6df7579 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Fri, 20 Jan 2023 08:31:01 +0100 Subject: [PATCH] --- cypress/platform/knsv2.html | 36 ++++++++++++++++--------- packages/mermaid-mindmap/src/svgDraw.js | 6 ++--- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/cypress/platform/knsv2.html b/cypress/platform/knsv2.html index afc12dbe93..e281846277 100644 --- a/cypress/platform/knsv2.html +++ b/cypress/platform/knsv2.html @@ -54,7 +54,7 @@ -
+    
 %%{init: {"flowchart": {"defaultRenderer": "elk"}} }%%
 graph TB
       a --> b
@@ -62,14 +62,14 @@
       b --> d
       c --> d
     
-
+    
 flowchart-elk TB
       a --> b
       a --> c
       b --> d
       c --> d
     
-
+    
 %%{init: {"flowchart": {"defaultRenderer": "elk"}} }%%
 flowchart TB
   %% I could not figure out how to use double quotes in labels in Mermaid
@@ -125,7 +125,7 @@
 

-
+    
 flowchart TB
   %% I could not figure out how to use double quotes in labels in Mermaid
   subgraph ibm[IBM Espresso CPU]
@@ -227,14 +227,24 @@
     Customer->>+Merchant: Receives goods or services
         
-
-      gantt
-        title Style today marker (vertical line should be 5px wide and half-transparent blue)
-        dateFormat YYYY-MM-DD
-        axisFormat %d
-        todayMarker stroke-width:5px,stroke:#00f,opacity:0.5
-        section Section1
-        Today: 1, -1h
+    
+mindmap
+  root((mindmap))
+    Origins
+      Long history
+      ::icon(fa fa-book)
+      Popularisation
+        British popular psychology author Tony Buzan
+    Research
+      On effectiveness
and features + On Automatic creation + Uses + Creative techniques + Strategic planning + Argument mapping + Tools + Pen and paper + Mermaid
@@ -252,7 +262,7 @@ // console.error('Mermaid error: ', err); }; mermaid.initialize({ - // theme: 'forest', + theme: 'dark', startOnLoad: true, logLevel: 0, flowchart: { diff --git a/packages/mermaid-mindmap/src/svgDraw.js b/packages/mermaid-mindmap/src/svgDraw.js index d4f57f1f17..e4a52ad98d 100644 --- a/packages/mermaid-mindmap/src/svgDraw.js +++ b/packages/mermaid-mindmap/src/svgDraw.js @@ -203,14 +203,12 @@ const roundedRectBkg = function (elem, node) { * @returns {number} The height nodes dom element */ export const drawNode = function (elem, node, fullSection, conf) { - const section = (fullSection % MAX_SECTIONS) - 1; + const section = fullSection % MAX_SECTIONS; const nodeElem = elem.append('g'); node.section = section; nodeElem.attr( 'class', - (node.class ? node.class + ' ' : '') + - 'mindmap-node ' + - (section < 0 ? 'section-root' : 'section-' + section) + (node.class ? node.class + ' ' : '') + 'mindmap-node ' + ('section-' + section) ); const bkgElem = nodeElem.append('g');