additionals/assets/javascripts/mermaid_load.js
2021-11-07 05:27:38 +01:00

25 lines
669 B
JavaScript

/* global globalThis, mermaid */
$(function() {
var mermaidTheme;
var mermaidThemeVariables;
if (globalThis !== undefined && globalThis.mermaidTheme !== undefined) {
mermaidTheme = globalThis.mermaidTheme;
} else {
mermaidTheme = 'default';
}
if (globalThis !== undefined && globalThis.mermaidThemeVariables !== undefined) {
mermaidThemeVariables = globalThis.mermaidThemeVariables;
} else {
mermaidThemeVariables = { 'fontSize': '12px' };
}
mermaid.initialize({
startOnLoad: true,
maxTextSize: 500000,
flowchart:{
useMaxWidth: false
},
theme: mermaidTheme,
themeVariables: mermaidThemeVariables });
});