mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-10-24 22:59:51 -04:00
Fix page flip throttling
This commit is contained in:
1 parent
36a8fb62e7
commit
4c481214cb
1 file changed
+1
@@ -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