Mermaid version 11.0.0-b.63

This commit is contained in:
Knut Sveidqvist
2024-08-14 14:05:57 +02:00
parent 43b038547e
commit 941a1723d8
4 changed files with 10385 additions and 8273 deletions

View File

@@ -101,21 +101,21 @@
console.error(err);
};
let code = `
stateDiagram
S:Stillas
T:Tiger
U:Ulv
state Z {
state X {
Y:Ypsilon
}
}
A
stateDiagram
S:Stillas
T:Tiger
U:Ulv
state Z {
state X {
Y:Ypsilon
}
}
A
S --> T: angrepp
T --> U: Apa
T --> V: Varg
`;
S --> T: angrepp
T --> U: Apa
T --> V: Varg
`;
const positions = {
nodes: {
@@ -154,6 +154,11 @@ stateDiagram
};
const { svg } = await mermaid.render('the-id-of-the-svg', code, undefined, positions);
if (window?.calcIntersections) {
console.log('Intersections', window.calcIntersections(positions, 'S', 'T'));
} else {
console.error('calcIntersections not found');
}
// console.log(svg);
const elem = document.querySelector('#diagram');
elem.innerHTML = svg;