mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
Fix initial prev/next
This commit is contained in:
+2
-2
@@ -740,7 +740,7 @@ export class Paginator extends HTMLElement {
|
|||||||
if (this.#canGoToIndex(resolved.index)) return this.#goTo(resolved)
|
if (this.#canGoToIndex(resolved.index)) return this.#goTo(resolved)
|
||||||
}
|
}
|
||||||
#scrollPrev() {
|
#scrollPrev() {
|
||||||
if (!this.#view) return
|
if (!this.#view) return true
|
||||||
if (this.scrolled) {
|
if (this.scrolled) {
|
||||||
if (this.start > 0)
|
if (this.start > 0)
|
||||||
return this.#scrollTo(Math.max(0, this.start - this.size), null, true)
|
return this.#scrollTo(Math.max(0, this.start - this.size), null, true)
|
||||||
@@ -751,7 +751,7 @@ export class Paginator extends HTMLElement {
|
|||||||
return this.#scrollToPage(page, null, true).then(() => page <= 0)
|
return this.#scrollToPage(page, null, true).then(() => page <= 0)
|
||||||
}
|
}
|
||||||
#scrollNext() {
|
#scrollNext() {
|
||||||
if (!this.#view) return
|
if (!this.#view) return true
|
||||||
if (this.scrolled) {
|
if (this.scrolled) {
|
||||||
if (this.viewSize - this.end > 2)
|
if (this.viewSize - this.end > 2)
|
||||||
return this.#scrollTo(Math.min(this.viewSize, this.end), null, true)
|
return this.#scrollTo(Math.min(this.viewSize, this.end), null, true)
|
||||||
|
|||||||
Reference in New Issue
Block a user