fix "ghost split", closes #3115

This commit is contained in:
zadam 2022-09-07 23:39:35 +02:00
parent b091e2222e
commit ecfce409d8
2 changed files with 6 additions and 4 deletions

View File

@ -1,7 +1,4 @@
import NoteContextAwareWidget from "../note_context_aware_widget.js";
import dialogService from "../dialog.js";
import server from "../../services/server.js";
import toastService from "../../services/toast.js";
const TPL = `
<div>

View File

@ -29,14 +29,19 @@ export default class NoteWrapperWidget extends FlexContainer {
}
refresh() {
const isHiddenExt = this.isHiddenExt(); // preserve through class reset
this.$widget.removeClass();
this.toggleExt(!isHiddenExt);
this.$widget.addClass("component note-split");
const note = this.noteContext?.note;
if (!note) {
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')