diff --git a/.changeset/fresh-bears-doubt.md b/.changeset/fresh-bears-doubt.md deleted file mode 100644 index 911ef74c1..000000000 --- a/.changeset/fresh-bears-doubt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'mermaid': patch ---- - -fix: Intersection calculations for tilted cylinder/DAS when using handdrawn look. Some random seeds could cause the calculations to break. diff --git a/cypress/integration/rendering/flowchart-elk.spec.js b/cypress/integration/rendering/flowchart-elk.spec.js index b5caef973..c3aba53ea 100644 --- a/cypress/integration/rendering/flowchart-elk.spec.js +++ b/cypress/integration/rendering/flowchart-elk.spec.js @@ -1,6 +1,6 @@ import { imgSnapshotTest, renderGraph } from '../../helpers/util.ts'; -describe.skip('Flowchart ELK', () => { +describe('Flowchart ELK', () => { it('1-elk: should render a simple flowchart', () => { imgSnapshotTest( `flowchart-elk TD @@ -857,6 +857,49 @@ flowchart LR D --> E A["A"] +`, + { flowchart: { titleTopMargin: 0 } } + ); + }); + it('6080: should handle diamond shape intersections', () => { + imgSnapshotTest( + `--- +config: + layout: elk +--- +flowchart LR + subgraph s1["Untitled subgraph"] + n1["Evaluate"] + n2["Option 1"] + n3["Option 2"] + n4["fa:fa-car Option 3"] + end + subgraph s2["Untitled subgraph"] + n5["Evaluate"] + n6["Option 1"] + n7["Option 2"] + n8["fa:fa-car Option 3"] + end + A["Start"] -- Some text --> B("Continue") + B --> C{"Evaluate"} + C -- One --> D["Option 1"] + C -- Two --> E["Option 2"] + C -- Three --> F["fa:fa-car Option 3"] + n1 -- One --> n2 + n1 -- Two --> n3 + n1 -- Three --> n4 + n5 -- One --> n6 + n5 -- Two --> n7 + n5 -- Three --> n8 + n1@{ shape: diam} + n2@{ shape: rect} + n3@{ shape: rect} + n4@{ shape: rect} + n5@{ shape: diam} + n6@{ shape: rect} + n7@{ shape: rect} + n8@{ shape: rect} + `, { flowchart: { titleTopMargin: 0 } } ); diff --git a/cypress/platform/knsv2.html b/cypress/platform/knsv2.html index f8c16ecc6..db7b4d3d7 100644 --- a/cypress/platform/knsv2.html +++ b/cypress/platform/knsv2.html @@ -90,40 +90,134 @@
-+--- config: - look: handDrawn - theme: default + layout: elk --- flowchart LR - n00@{ shape: triangle, label: 'This is a label for triangle shape' } - n11@{ shape: sloped-rectangle, label: 'This is a label for sloped-rectangle shape' } - n22@{ shape: horizontal-cylinder, label: 'This is a label for horizontal-cylinder shape' } - n33@{ shape: flipped-triangle, label: 'This is a label for flipped-triangle shape' } - n44@{ shape: hourglass, label: 'This is a label for hourglass shape' } - n00 --> n11 - n00 --> n22 - n00 --> n33 - n00 --> n44 - n11 --> n22 - n11 --> n33 - n11 --> n44 - n22 --> n33 - n22 --> n44 - n33 --> n44 + subgraph s1["Untitled subgraph"] + n1["Evaluate"] + n2["Option 1"] + n3["Option 2"] + n4["fa:fa-car Option 3"] + end + n1 -- One --> n2 + n1 -- Two --> n3 + n1 -- Three --> n4 + n5 + n1@{ shape: diam} + n2@{ shape: rect} + n3@{ shape: rect} + n4@{ shape: rect} + A["Start"] -- Some text --> B("Continue") + B --> C{"Evaluate"} + C -- One --> D["Option 1"] + C -- Two --> E["Option 2"] + C -- Three --> F["fa:fa-car Option 3"] + +--- config: - look: handDrawn - theme: default + layout: elk --- flowchart LR - n22@{ shape: h-cyl } - n00 --> n11 - n00 --> n22 - n11 --> n22 + subgraph s1["Untitled subgraph"] + n1["Evaluate"] + n2["Option 1"] + n3["Option 2"] + n4["fa:fa-car Option 3"] + end + subgraph s2["Untitled subgraph"] + n5["Evaluate"] + n6["Option 1"] + n7["Option 2"] + n8["fa:fa-car Option 3"] + end + A["Start"] -- Some text --> B("Continue") + B --> C{"Evaluate"} + C -- One --> D["Option 1"] + C -- Two --> E["Option 2"] + C -- Three --> F["fa:fa-car Option 3"] + n1 -- One --> n2 + n1 -- Two --> n3 + n1 -- Three --> n4 + n5 -- One --> n6 + n5 -- Two --> n7 + n5 -- Three --> n8 + n1@{ shape: diam} + n2@{ shape: rect} + n3@{ shape: rect} + n4@{ shape: rect} + n5@{ shape: diam} + n6@{ shape: rect} + n7@{ shape: rect} + n8@{ shape: rect} + +++--- +config: + layout: elk +--- +flowchart LR + subgraph s1["Untitled subgraph"] + n1["Evaluate"] + n2["Option 1"] + end + n1 -- One --> n2 + + + + +++--- +config: + layout: elk +--- +flowchart LR + A{A} --> B & C +++--- +config: + layout: elk +--- +flowchart LR + n2@{ shape: rect} + n3@{ shape: rect} + n4@{ shape: rect} + A["Start"] -- Some text --> B("Continue") + B --> C{"Evaluate"} + C -- One --> D["Option 1"] + C -- Two --> E["Option 2"] + C -- Three --> F["fa:fa-car Option 3"] + %% C@{ shape: hexagon} + + +++--- +config: + kanban: + ticketBaseUrl: 'https://github.com/your-repo/issues/#TICKET#' +--- +kanban + Backlog + task1[📝 Define project requirements]@{ ticket: a101 } + To Do + task2[🔍 Research technologies]@{ ticket: a102 } + Review + task4[🔍 Code review for login feature]@{ ticket: a104 } + Done + task5[✅ Deploy initial version]@{ ticket: a105 } + In Progress + task3[💻 Develop login feature]@{ ticket: 103 } +flowchart LR diff --git a/demos/dev/example.html b/demos/dev/example.html index 27d31e177..cc49ddffb 100644 --- a/demos/dev/example.html +++ b/demos/dev/example.html @@ -39,8 +39,8 @@ graph TB