Mind map coming in from the cold. A lazy loaded diagram in the same way as timeline.

This commit is contained in:
Knut Sveidqvist
2023-02-08 17:42:58 +01:00
parent 38a84a7fe0
commit 74df4a7a68
34 changed files with 206 additions and 344 deletions

View File

@@ -1,5 +1,5 @@
import mermaid2 from '../../packages/mermaid/src/mermaid';
import mindmap from '../../packages/mermaid-mindmap/src/detector';
import externalExample from '../../packages/mermaid-example-diagram/src/detector';
function b64ToUtf8(str) {
return decodeURIComponent(escape(window.atob(str)));
@@ -44,7 +44,7 @@ const contentLoaded = async function () {
document.getElementsByTagName('body')[0].appendChild(div);
}
await mermaid2.registerExternalDiagrams([mindmap]);
await mermaid2.registerExternalDiagrams([externalExample]);
mermaid2.initialize(graphObj.mermaid);
await mermaid2.init();
markRendered();