Merge pull request #6055 from agokhale/no-dev-elk-import

Use layout-elk in example.html
This commit is contained in:
Sidharth Vinod 2024-11-27 15:07:13 +05:30 committed by GitHub
commit 95964b5487
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -39,8 +39,8 @@ graph TB
<script type="module">
import mermaid from '/mermaid.esm.mjs';
import flowchartELK from '/mermaid-flowchart-elk.esm.mjs';
await mermaid.registerExternalDiagrams([flowchartELK]);
import layouts from '/mermaid-layout-elk.esm.mjs';
mermaid.registerLayoutLoaders(layouts);
async function render(str) {
const { svg } = await mermaid.render('dynamic', str);
document.getElementById('dynamicDiagram').innerHTML = svg;