#47 : Prevent swiping if swiping is false
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user