mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-10-25 06:59:51 -04:00
Fix visible range
This commit is contained in:
1 parent
31f9d4f919
commit
887138472b
1 file changed
+4
-1
+4
-1
@@ -663,8 +663,11 @@ export class Paginator extends HTMLElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#getVisibleRange() {
|
#getVisibleRange() {
|
||||||
|
if (this.scrolled) return getVisibleRange(this.#view.document,
|
||||||
|
this.start, this.end, this.#getRectMapper())
|
||||||
|
const { size } = this
|
||||||
return getVisibleRange(this.#view.document,
|
return getVisibleRange(this.#view.document,
|
||||||
this.start, this.end, this.#getRectMapper(), this.scrolled)
|
this.start - size, this.end - size, this.#getRectMapper())
|
||||||
}
|
}
|
||||||
#afterScroll(reason) {
|
#afterScroll(reason) {
|
||||||
const range = this.#getVisibleRange()
|
const range = this.#getVisibleRange()
|
||||||
|
|||||||
Reference in new issue
Block a user