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

View File

@ -65,7 +65,15 @@ function addHtmlLabel(node) {
const label = node.label;
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);
div.style('display', 'inline-block');