diff --git a/cypress/platform/knsv2.html b/cypress/platform/knsv2.html index ef44ed617..f30f993fa 100644 --- a/cypress/platform/knsv2.html +++ b/cypress/platform/knsv2.html @@ -56,21 +56,10 @@
Security check
-classDiagram
-        direction LR
-        class Student {
-          -idCard : IdCard
-        }
-        class IdCard{
-          -id : int
-          -name : string
-        }
-        class Bike{
-          -id : int
-          -name : string
-        }
-        Student "1" --o "1" IdCard : carries
-        Student "1" --o "1" Bike : rides
+flowchart TD
+    A --> B
+    B --> C
+    A --> C
     
 mindmap
@@ -93,8 +82,14 @@ mindmap
       Pen and paper
       Mermaid
         
-
-      example-diagram
+    
+      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
     
@@ -111,13 +106,18 @@ mindmap theme: 'base', startOnLoad: true, logLevel: 0, - // basePath: './packages/', - // themeVariables: { darkMode: true }, + flowchart: { + useMaxWidth: false, + htmlLabels: true, + }, + gantt: { + useMaxWidth: false, + }, + useMaxWidth: false, lazyLoadedDiagrams: [ './mermaid-mindmap-detector.esm.mjs', './mermaid-example-diagram-detector.esm.mjs', ], - // lazyLoadedDiagrams: ['../../mermaid-mindmap/registry.ts'], }); function callback() { alert('It worked'); diff --git a/packages/mermaid/src/setupGraphViewbox.js b/packages/mermaid/src/setupGraphViewbox.js index 6ec7f564b..14929d3d7 100644 --- a/packages/mermaid/src/setupGraphViewbox.js +++ b/packages/mermaid/src/setupGraphViewbox.js @@ -26,6 +26,7 @@ export const calculateSvgSizeAttrs = function (height, width, useMaxWidth) { attrs.set('width', '100%'); attrs.set('style', `max-width: ${width}px;`); } else { + attrs.set('height', height); attrs.set('width', width); } return attrs;