#1874 #1865 Fix for regression issue - flowchart

This commit is contained in:
Knut Sveidqvist 2021-01-28 20:51:11 +01:00
parent fc5693067c
commit 1b9d9fe12c
2 changed files with 20 additions and 5 deletions

View File

@ -58,7 +58,7 @@ flowchart TD
class T TestSub class T TestSub
linkStyle 0,1 color:orange, stroke: orange; linkStyle 0,1 color:orange, stroke: orange;
</div> </div>
<div class="mermaid" style="width: 50%; height: 20%;"> <div class="mermaid2" style="width: 50%; height: 20%;">
sequenceDiagram sequenceDiagram
Actor1 -) Actor2:Async Actor1 -) Actor2:Async
Actor1 --) Actor2:Async dotted Actor1 --) Actor2:Async dotted
@ -69,7 +69,7 @@ flowchart TD
flowchart TD flowchart TD
C -->|fa:fa-car Car| F[fa:fa-car Car] C -->|fa:fa-car Car| F[fa:fa-car Car]
</div> </div>
<div class="mermaid" style="width: 50%; height: 20%;"> <div class="mermaid2" style="width: 50%; height: 20%;">
%%{init: { 'logLevel': 0, 'theme': 'forest'} }%% %%{init: { 'logLevel': 0, 'theme': 'forest'} }%%
graph TD graph TD
A(Start) --> B[/Another/] A(Start) --> B[/Another/]
@ -79,7 +79,7 @@ graph TD
C C
end end
</div> </div>
<div class="mermaid" style="width: 50%; height: 20%;"> <div class="mermaid2" style="width: 50%; height: 20%;">
%%{init: {'theme': 'base' }}%% %%{init: {'theme': 'base' }}%%
%%{init2: { 'logLevel': 0, 'theme': 'forest'} }%% %%{init2: { 'logLevel': 0, 'theme': 'forest'} }%%
flowchart TD flowchart TD
@ -95,7 +95,7 @@ flowchart TD
C ======> E5 C ======> E5
</div> </div>
<div class="mermaid" style="width: 50%; height: 20%;"> <div class="mermaid" style="width: 50%; height: 20%;">
graph TB flowchart TB
A A
B B
subgraph foo[Foo SubGraph] subgraph foo[Foo SubGraph]
@ -124,6 +124,13 @@ flowchart TD
style bar fill:#999,stroke-width:10px,stroke:#0F0,color:blue style bar fill:#999,stroke-width:10px,stroke:#0F0,color:blue
</div> </div>
<div class="mermaid" style="width: 50%; height: 20%;"> <div class="mermaid" style="width: 50%; height: 20%;">
flowchart TB
subgraph bar[Bar]
F
end
style bar fill:#999,stroke-width:10px,stroke:#0F0,color:blue
</div>
<div class="mermaid" style="width: 50%; height: 20%;">
%%{init:{"theme":"base", "themeVariables": {"primaryColor":"#411d4e", "titleColor":"white", "darkMode":true}}}%% %%{init:{"theme":"base", "themeVariables": {"primaryColor":"#411d4e", "titleColor":"white", "darkMode":true}}}%%
flowchart LR flowchart LR
subgraph A subgraph A

View File

@ -65,7 +65,15 @@ function addHtmlLabel(node) {
const label = node.label; const label = node.label;
const labelClass = node.isNode ? 'nodeLabel' : 'edgeLabel'; const labelClass = node.isNode ? 'nodeLabel' : 'edgeLabel';
div.html('<span class="' + labelClass + '">' + label + '</span>'); div.html(
'<span class="' +
labelClass +
'" ' +
(node.labelStyle ? 'style="' + node.labelStyle + '"' : '') +
'>' +
label +
'</span>'
);
applyStyle(div, node.labelStyle); applyStyle(div, node.labelStyle);
div.style('display', 'inline-block'); div.style('display', 'inline-block');