1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-08-13 22:12:50 +02:00

All: Improve rendering of Mermaid graphs

This commit is contained in:
Laurent Cozic
2019-03-03 00:31:41 +00:00
parent 630e77b9eb
commit 687b9d1bef
2 changed files with 6 additions and 2 deletions

View File

@@ -17,7 +17,11 @@ class NavigatorComponent extends Component {
}
updateWindowTitle(title) {
if (bridge().window()) bridge().window().setTitle(title);
try {
if (bridge().window()) bridge().window().setTitle(title);
} catch (error) {
console.warn('updateWindowTitle', error);
}
}
render() {

View File

@@ -15,7 +15,7 @@ class MdToHtml_Mermaid {
// Force a white background because the graphs can have various colours
// that may not be compatible with the current theme. Also make it
// inline-block so that the div is the same size as the content.
return '.mermaid { background-color: white; display:inline-block; }';
return '.mermaid { width: 100%; } .mermaid svg { background-color: white; }';
}
injectedJavaScript() {