Fix visible range

This commit is contained in:
John Factotum
2023-05-17 12:49:23 +08:00
parent 31f9d4f919
commit 887138472b
+4 -1
View File
@@ -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()