Updated logic for vertex label

This commit is contained in:
saurabhg772244
2024-09-10 12:10:36 +05:30
parent 3d9e919545
commit dbe965303b
2 changed files with 3 additions and 3 deletions

View File

@@ -63,7 +63,7 @@
<body> <body>
<pre id="diagram4" class="mermaid"> <pre id="diagram4" class="mermaid">
flowchart LR flowchart LR
A --> B2@{ icon: "fa:bell", form: "square", label: "test augfuyfavf ydvaubfuac", pos: "t", h: 400, w: 50 }@ --> C A --> B2@{ icon: "fa:bell", form: "square", label: "B2", pos: "t", h: 400, w: 50 }@ --> C
</pre </pre
> >
<pre id="diagram5" class="mermaid2"> <pre id="diagram5" class="mermaid2">

View File

@@ -146,7 +146,7 @@ export const addVertex = function (
} }
if (doc?.icon) { if (doc?.icon) {
vertex.icon = doc?.icon; vertex.icon = doc?.icon;
if (vertex.text === id) { if (!doc.label) {
vertex.text = ''; vertex.text = '';
} }
} }
@@ -158,7 +158,7 @@ export const addVertex = function (
} }
if (doc?.img) { if (doc?.img) {
vertex.img = doc?.img; vertex.img = doc?.img;
if (vertex.text === id) { if (!doc.label) {
vertex.text = ''; vertex.text = '';
} }
} }