Hi folks, I want mermaidjs rerender diagrams when I switched color-scheme, such as switching form 'dark' to 'light', I tried use mermaid.mermaidAPI.reinitialize() with different theme configurations, but it seems not working.
I see that it keep the theme as same as the first initial, when I changed the theme value, called reinitialize(newConfig), remove last rendered graphs and rerendered the new diagrams, it shows nothing different with the theme rendered before.
Is that I was misunderstood the reinitialize() function usage or there is something wrong with my code?
And for initialize(options) function, it seems only the theme changes can not be applied, I am not sure whether the color changes is applied to render new svgs.
...
if(options&&options.theme&&theme[options.theme]){// Todo merge with user optionsoptions.themeVariables=theme[options.theme].getThemeVariables(options.themeVariables);}else{if(options)options.themeVariables=theme.default.getThemeVariables(options.themeVariables);}
...
How to reinitialize with new theme?
Hi folks, I want mermaidjs rerender diagrams when I switched color-scheme, such as switching form 'dark' to 'light', I tried use
mermaid.mermaidAPI.reinitialize()with different theme configurations, but it seems not working.I see that it keep the theme as same as the first initial, when I changed the theme value, called
reinitialize(newConfig), remove last rendered graphs and rerendered the new diagrams, it shows nothing different with the theme rendered before.Is that I was misunderstood the
reinitialize()function usage or there is something wrong with my code?Thanks.
The text was updated successfully, but these errors were encountered: