diff --git a/db/demo.zip b/db/demo.zip index a4ec00e3d..1b707fe21 100644 Binary files a/db/demo.zip and b/db/demo.zip differ diff --git a/src/public/app/widgets/mermaid.js b/src/public/app/widgets/mermaid.js index 9bd64440e..4c66348d2 100644 --- a/src/public/app/widgets/mermaid.js +++ b/src/public/app/widgets/mermaid.js @@ -11,10 +11,13 @@ const TPL = `
border-bottom: 1px solid var(--main-border-color); padding: 20px; margin-bottom: 10px; - display: flex; - justify-content: space-around; /* centering rendered SVG */ flex-basis: 0; } + + .mermaid-render { + overflow: auto; + height: 100%; + }
@@ -48,9 +51,18 @@ export default class MermaidWidget extends NoteContextAwareWidget { const documentStyle = window.getComputedStyle(document.documentElement); const mermaidTheme = documentStyle.getPropertyValue('--mermaid-theme'); - console.log(mermaidTheme, "mermaidTheme"); - - mermaid.mermaidAPI.initialize({ startOnLoad: false, theme: mermaidTheme.trim() }); + mermaid.mermaidAPI.initialize({ + startOnLoad: false, + theme: mermaidTheme.trim(), + flow: { useMaxWidth: false }, + sequence: { useMaxWidth: false }, + gantt: { useMaxWidth: false }, + "class": { useMaxWidth: false }, + state: { useMaxWidth: false }, + pie: { useMaxWidth: false }, + journey: { useMaxWidth: false }, + git: { useMaxWidth: false }, + }); const noteComplement = await froca.getNoteComplement(note.noteId); const content = noteComplement.content || "";