Scrolled mode: leave space for top margin when scrolling to position

This commit is contained in:
John Factotum
2023-05-14 22:11:46 +08:00
parent a41e4b897c
commit 17fb71943f
+1 -1
View File
@@ -565,7 +565,7 @@ export class Paginator {
}
async #scrollToRect(rect, reason) {
if (this.scrolled) {
const offset = this.#getRectMapper()(rect).left
const offset = this.#getRectMapper()(rect).left - this.layout.margin
return this.#scrollTo(offset, reason)
}
const offset = this.#getRectMapper()(rect).left