mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	scroll padding widget only on text and code notes
This commit is contained in:
		
							parent
							
								
									bde311fd76
								
							
						
					
					
						commit
						341480e7cf
					
				| @ -3,6 +3,10 @@ import NoteContextAwareWidget from "./note_context_aware_widget.js"; | |||||||
| const TPL = `<div class="scroll-padding-widget"></div>`; | const TPL = `<div class="scroll-padding-widget"></div>`; | ||||||
| 
 | 
 | ||||||
| export default class ScrollPaddingWidget extends NoteContextAwareWidget { | export default class ScrollPaddingWidget extends NoteContextAwareWidget { | ||||||
|  |     isEnabled() { | ||||||
|  |         return super.isEnabled() && ["text", "code"].includes(this.note?.type); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     doRender() { |     doRender() { | ||||||
|         this.$widget = $(TPL); |         this.$widget = $(TPL); | ||||||
|         this.contentSized(); |         this.contentSized(); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam