Merge pull request #3057 from eliandoran/bugfix/max_content_width

Fix max content width not working (fixes #3056)
This commit is contained in:
zadam 2022-08-14 14:52:49 +02:00 committed by GitHub
commit 9a691c8227
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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')