mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-11-04 15:11:31 +08:00 
			
		
		
		
	Merge remote-tracking branch 'origin/master'
This commit is contained in:
		
						commit
						d59542dd6f
					
				@ -150,6 +150,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
 | 
				
			|||||||
    doRender() {
 | 
					    doRender() {
 | 
				
			||||||
        this.$widget = $(TPL);
 | 
					        this.$widget = $(TPL);
 | 
				
			||||||
        this.$tree = this.$widget.find('.tree');
 | 
					        this.$tree = this.$widget.find('.tree');
 | 
				
			||||||
 | 
					        this.$treeActions = this.$widget.find(".tree-actions");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        this.$tree.on("mousedown", ".unhoist-button", () => hoistedNoteService.unhoist());
 | 
					        this.$tree.on("mousedown", ".unhoist-button", () => hoistedNoteService.unhoist());
 | 
				
			||||||
        this.$tree.on("mousedown", ".refresh-search-button", e => this.refreshSearch(e));
 | 
					        this.$tree.on("mousedown", ".refresh-search-button", e => this.refreshSearch(e));
 | 
				
			||||||
@ -200,20 +201,16 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
 | 
				
			|||||||
            this.$hideIncludedImages.prop("checked", this.hideIncludedImages);
 | 
					            this.$hideIncludedImages.prop("checked", this.hideIncludedImages);
 | 
				
			||||||
            this.$autoCollapseNoteTree.prop("checked", this.autoCollapseNoteTree);
 | 
					            this.$autoCollapseNoteTree.prop("checked", this.autoCollapseNoteTree);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            let top = this.$treeSettingsButton[0].offsetTop;
 | 
					            const top = this.$treeActions[0].offsetTop - (this.$treeSettingsPopup.outerHeight());
 | 
				
			||||||
            let left = this.$treeSettingsButton[0].offsetLeft;
 | 
					            const left = Math.max(
 | 
				
			||||||
            top -= this.$treeSettingsPopup.outerHeight() + 10;
 | 
					                0,
 | 
				
			||||||
            left += this.$treeSettingsButton.outerWidth() - this.$treeSettingsPopup.outerWidth();
 | 
					                this.$treeActions[0].offsetLeft - this.$treeSettingsPopup.outerWidth() + this.$treeActions.outerWidth()
 | 
				
			||||||
 | 
					            );
 | 
				
			||||||
            if (left < 0) {
 | 
					 | 
				
			||||||
                left = 0;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
            this.$treeSettingsPopup.css({
 | 
					            this.$treeSettingsPopup.css({
 | 
				
			||||||
                display: "block",
 | 
					                top,
 | 
				
			||||||
                top: top,
 | 
					                left
 | 
				
			||||||
                left: left
 | 
					            }).show();
 | 
				
			||||||
            }).addClass("show");
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
            return false;
 | 
					            return false;
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user