mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
Paginator: account for margin when getting visible area in scrolled mode
Follows 17fb71943f
This commit is contained in:
+1
-1
@@ -796,7 +796,7 @@ export class Paginator extends HTMLElement {
|
|||||||
}
|
}
|
||||||
#getVisibleRange() {
|
#getVisibleRange() {
|
||||||
if (this.scrolled) return getVisibleRange(this.#view.document,
|
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
|
const size = this.#rtl ? -this.size : this.size
|
||||||
return getVisibleRange(this.#view.document,
|
return getVisibleRange(this.#view.document,
|
||||||
this.start - size, this.end - size, this.#getRectMapper())
|
this.start - size, this.end - size, this.#getRectMapper())
|
||||||
|
|||||||
Reference in New Issue
Block a user