mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-10-24 22:59:51 -04:00
Scrolled mode: leave space for top margin when scrolling to position
This commit is contained in:
1 parent
a41e4b897c
commit
17fb71943f
1 file changed
+1
-1
+1
-1
@@ -565,7 +565,7 @@ export class Paginator {
|
|||||||
}
|
}
|
||||||
async #scrollToRect(rect, reason) {
|
async #scrollToRect(rect, reason) {
|
||||||
if (this.scrolled) {
|
if (this.scrolled) {
|
||||||
const offset = this.#getRectMapper()(rect).left
|
const offset = this.#getRectMapper()(rect).left - this.layout.margin
|
||||||
return this.#scrollTo(offset, reason)
|
return this.#scrollTo(offset, reason)
|
||||||
}
|
}
|
||||||
const offset = this.#getRectMapper()(rect).left
|
const offset = this.#getRectMapper()(rect).left
|
||||||
|
|||||||
Reference in new issue
Block a user