From 6559cfd0e16e87c2f54d4bf350cff9731dcf0c43 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Sat, 13 Jun 2020 13:12:33 +0200 Subject: [PATCH 1/2] #1466 Handling line styles using the new rendering engine --- cypress/platform/current.html | 247 +++------------------- src/dagre-wrapper/GraphObjects.md | 2 + src/dagre-wrapper/edges.js | 26 ++- src/dagre-wrapper/markers.js | 70 +++--- src/diagrams/flowchart/flowRenderer-v2.js | 10 +- src/diagrams/state/stateRenderer-v2.js | 7 +- src/themes/flowchart.scss | 5 + src/themes/mermaid.scss | 30 ++- 8 files changed, 140 insertions(+), 257 deletions(-) diff --git a/cypress/platform/current.html b/cypress/platform/current.html index 83baa8718c..b95b8c19e4 100644 --- a/cypress/platform/current.html +++ b/cypress/platform/current.html @@ -20,223 +20,40 @@

info below

-
- flowchart LR - user1[fa:fa-user User 1] -- edit -> folder +
+flowchart TB + subgraph 1 + A --> B; + A -.-> C; + A ==> D; + A ==> E; + B <--> F + C <--> F + D <--> F + E <--> F + end + subgraph 2 + A2 --x B2; + A2 -.-x C2; + A2 ==x D2; + A2 ==x E2; + B2 x--x F2 + C2 x--x F2 + D2 x--x F2 + E2 x--x F2 + end + subgraph 3 + A3 --o B3; + A3 -.-o C3; + A3 ==o D3; + A3 ==o E3; + B3 o--o F3 + C3 o--o F3 + D3 o--o F3 + E3 o--o F3 + end
-
-flowchart LR - A{{A}}-- apa -->B{{B}}; - click A callback "Tooltip" - click B "http://www.github.com" "This is a link" -
-
-graph LR - A{{A}}--apa-->B{{B}}; - -
-
- stateDiagram-v2 - [*]-->TV - - state TV { - state fork_state <<fork>> - [*] --> fork_state - fork_state --> State2 - fork_state --> State3 - - state join_state <<join>> - State2 --> join_state - State3 --> join_state - join_state --> State4 - State4 --> [*] - } -
-
- stateDiagram-v2 - [*] --> Still - Still --> [*] - Still --> Moving - Moving --> Still - Moving --> Crash - Crash --> [*] -
-
-stateDiagram-v2 - [*] --> First - First --> Third - First --> sec - - state First { - [*] --> fir - fir --> [*] - } - state Second { - [*] --> sec - sec --> [*] - } - state Third { - [*] --> thi - thi --> [*] - } - thi --> sec -
-
-flowchart TD - subgraph A - a - end - subgraph B - b - end - subgraph C - subgraph D - d - end - end - A -- oAo --o B - A --> C -
-
-flowchart TD - subgraph A - a - end - subgraph B - b - end - c-->A - c-->B -
-
-stateDiagram-v2 - [*] --> First - First --> Second - First --> Third - - state First { - [*] --> fir - fir --> [*] - } - state Second { - [*] --> sec - sec --> [*] - } - state Third { - [*] --> thi - thi --> [*] - } -
-
- stateDiagram-v2 - [*]-->TV - - state TV { - [*] --> Off: Off to start with - On --> Off : Turn off - Off --> On : Turn on - } - - TV--> Console - - state Console { - [*] --> Off2: Off to start with - On2--> Off2 : Turn off - Off2 --> On2 : Turn on - On2-->Playing - - state Playing { - Alive --> Dead - Dead-->Alive - } - } -
- -
-
- stateDiagram-v2 - state apa { - [*] --> Still - Still --> [*] - - Still --> Moving - Moving --> Still - Moving --> Crash - Crash --> [*] - } - -
-
- flowchart TB - a --> b - - subgraph id1 [Test] - a --apa--> c - b - c-->b - b-->H - end - G-->H - G-->id1 - id1 --> I - I --> G -
-
- flowchart RL - a --> b - - subgraph id1 [Test] - a --apa--> c - b - c-->b - b-->H - end - G-->H - G-->id1 - id1 --> I - I --> G -
-
- flowchart RL - - subgraph id1 [Test] - a - end - b-->id1 -
-
- flowchart RL - - subgraph id1 [Test1] - a - end - subgraph id2 [Test2] - b - end - a --> id2 - a --> b - b-->id1 - id1 --> id2 -
- new: -
- flowchart LR - a <--> b - b o--o c - c x--x d - a21([In the box]) --> b2 - b2((b2)) --o c2 - c2(c2) --x d2 --> id1{{This is the text in the box}} --> A[(cylindrical
shape
test)] -
- old: -
- graph LR - a((a)) --> b --> id1{{This is the text in the box}} - A[(cylindrical
shape
test)] -
- -