mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix "ghost split", closes #3115
This commit is contained in:
parent
b091e2222e
commit
ecfce409d8
@ -1,7 +1,4 @@
|
|||||||
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
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 = `
|
const TPL = `
|
||||||
<div>
|
<div>
|
||||||
|
@ -29,14 +29,19 @@ export default class NoteWrapperWidget extends FlexContainer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
refresh() {
|
refresh() {
|
||||||
|
const isHiddenExt = this.isHiddenExt(); // preserve through class reset
|
||||||
|
|
||||||
this.$widget.removeClass();
|
this.$widget.removeClass();
|
||||||
|
|
||||||
|
this.toggleExt(!isHiddenExt);
|
||||||
|
|
||||||
|
this.$widget.addClass("component note-split");
|
||||||
|
|
||||||
const note = this.noteContext?.note;
|
const note = this.noteContext?.note;
|
||||||
if (!note) {
|
if (!note) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$widget.addClass("note-split");
|
|
||||||
this.$widget.toggleClass("full-content-width",
|
this.$widget.toggleClass("full-content-width",
|
||||||
['image', 'mermaid', 'book', 'render', 'canvas', 'web-view'].includes(note.type)
|
['image', 'mermaid', 'book', 'render', 'canvas', 'web-view'].includes(note.type)
|
||||||
|| !!note?.hasLabel('fullContentWidth')
|
|| !!note?.hasLabel('fullContentWidth')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user