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>
<pre id="diagram4" class="mermaid">
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 id="diagram5" class="mermaid2">

View File

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