Paginator: account for margin when getting visible area in scrolled mode

Follows 17fb71943f
This commit is contained in:
John Factotum
2023-06-03 01:26:35 +08:00
parent 4732a23e17
commit 5261c48a90
+1 -1
View File
@@ -796,7 +796,7 @@ export class Paginator extends HTMLElement {
}
#getVisibleRange() {
if (this.scrolled) return getVisibleRange(this.#view.document,
this.start, this.end, this.#getRectMapper())
this.start + this.#margin, this.end - this.#margin, this.#getRectMapper())
const size = this.#rtl ? -this.size : this.size
return getVisibleRange(this.#view.document,
this.start - size, this.end - size, this.#getRectMapper())