scroll padding widget only on text and code notes

This commit is contained in:
zadam 2023-11-06 22:26:17 +01:00
parent bde311fd76
commit 341480e7cf

View File

@ -3,6 +3,10 @@ import NoteContextAwareWidget from "./note_context_aware_widget.js";
const TPL = `<div class="scroll-padding-widget"></div>`;
export default class ScrollPaddingWidget extends NoteContextAwareWidget {
isEnabled() {
return super.isEnabled() && ["text", "code"].includes(this.note?.type);
}
doRender() {
this.$widget = $(TPL);
this.contentSized();