#47 : Prevent swiping if swiping is false

This commit is contained in:
Vadim
2021-07-24 15:21:30 +03:00
parent 1dbccd20a9
commit 35495d6f91

View File

@@ -286,15 +286,19 @@
// gestures // gestures
function handleSwipeStart() { function handleSwipeStart() {
if (!swiping) return
_duration = 0 _duration = 0
} }
async function handleThreshold(event) { async function handleThreshold(event) {
if (!swiping) return
await directionFnDescription[event.detail.direction]() await directionFnDescription[event.detail.direction]()
} }
function handleSwipeMove(event) { function handleSwipeMove(event) {
if (!swiping) return
offset += event.detail.dx offset += event.detail.dx
} }
function handleSwipeEnd() { function handleSwipeEnd() {
if (!swiping) return
showPage(currentPageIndex) showPage(currentPageIndex)
} }
function handleFocused(event) { function handleFocused(event) {