mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
Paginator: fix offset
What's `margin` doing here?! It's like this since the first commit, but it makes no sense... I think I added it incorrectly, being misled by the getBoundingClientRect bug in Firefox...
This commit is contained in:
@@ -816,7 +816,6 @@ export class Paginator extends HTMLElement {
|
||||
return this.#scrollTo(offset, reason)
|
||||
}
|
||||
const offset = this.#getRectMapper()(rect).left
|
||||
+ this.#margin / 2
|
||||
return this.#scrollToPage(Math.floor(offset / this.size) + (this.#rtl ? -1 : 1), reason)
|
||||
}
|
||||
async #scrollTo(offset, reason, smooth) {
|
||||
|
||||
Reference in New Issue
Block a user