mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
This commit is contained in:
parent
c318fe9b49
commit
3df605d2e7
1 changed files with 1 additions and 6 deletions
|
|
@ -772,12 +772,7 @@ export class Files extends Model {
|
|||
liItem.classList.remove("b3-list-item--focus");
|
||||
});
|
||||
target.classList.add("b3-list-item--focus");
|
||||
const titleHeight = this.actionsElement.clientHeight;
|
||||
if (target.offsetTop - titleHeight < this.element.scrollTop) {
|
||||
this.element.scrollTop = target.offsetTop - titleHeight;
|
||||
} else if (target.offsetTop - this.element.clientHeight - titleHeight + target.clientHeight > this.element.scrollTop) {
|
||||
this.element.scrollTop = target.offsetTop - this.element.clientHeight - titleHeight + target.clientHeight;
|
||||
}
|
||||
this.element.scrollTop = target.offsetTop - this.element.clientHeight / 2 - this.actionsElement.clientHeight;
|
||||
}
|
||||
|
||||
public getLeaf(liElement: Element, notebookId: string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue