Skip to content

Build your personal knowledge base with Trilium Notes

Fix max content width not working (fixes #3056)

Elian Dorand73da33b081a
diff --git a/src/public/app/widgets/note_wrapper.js b/src/public/app/widgets/note_wrapper.js
index 8b02daa2a3..cae922a3a7 100644
--- a/src/public/app/widgets/note_wrapper.js
+++ b/src/public/app/widgets/note_wrapper.js
@@ -10,12 +10,6 @@ export default class NoteWrapperWidget extends FlexContainer {
.collapsible();
}
- doRender() {
- super.doRender();
-
- this.$widget.addClass("note-split");
- }
-
setNoteContextEvent({noteContext}) {
this.noteContext = noteContext;
@@ -42,6 +36,7 @@ export default class NoteWrapperWidget extends FlexContainer {
return;
}
+ this.$widget.addClass("note-split");
this.$widget.toggleClass("full-content-width",
['image', 'mermaid', 'book', 'render', 'canvas', 'web-view'].includes(note.type)
|| !!note?.hasLabel('fullContentWidth')