Skip to content

Commit

Permalink
scroll padding widget only on text and code notes
Browse files Browse the repository at this point in the history
  • Loading branch information
zadam committed Nov 6, 2023
1 parent bde311f commit 341480e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/public/app/widgets/scroll_padding.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 341480e

Please sign in to comment.