mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
Scrolled mode: leave space for top margin when scrolling to position
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user