mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
Fix page flip throttling
This commit is contained in:
@@ -852,6 +852,7 @@ export class Paginator extends HTMLElement {
|
|||||||
if (this.sections[index]?.linear !== 'no') return index
|
if (this.sections[index]?.linear !== 'no') return index
|
||||||
}
|
}
|
||||||
async #turnPage(dir) {
|
async #turnPage(dir) {
|
||||||
|
if (this.#locked) return
|
||||||
this.#locked = true
|
this.#locked = true
|
||||||
const prev = dir === -1
|
const prev = dir === -1
|
||||||
const shouldGo = await (prev ? this.#scrollPrev() : this.#scrollNext())
|
const shouldGo = await (prev ? this.#scrollPrev() : this.#scrollNext())
|
||||||
|
|||||||
Reference in New Issue
Block a user