mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix mermaid diagram size
This commit is contained in:
parent
291b434d70
commit
831de3ffed
BIN
db/demo.zip
BIN
db/demo.zip
Binary file not shown.
@ -11,10 +11,13 @@ const TPL = `<div class="mermaid-widget">
|
||||
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%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="mermaid-error alert alert-warning">
|
||||
@ -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 || "";
|
||||
|
Loading…
x
Reference in New Issue
Block a user