I need assistance with resetting the panning value. Essentially, I would like the panning value to return to 0 when it reaches -130.
Below is my code snippet:
swipeEvent($e) {
if ($e.deltaX <= -130) {
document.getElementById("button").click();
console.log('swiped left')
};
if ($e.deltaX < -131) { $e.deltaX == 0 }
}
I have already attempted the following code:
if ($e.deltaX < -131) { $e.deltaX = 0 }
Unfortunately, this solution did not work as expected. Can anyone provide guidance on how to fix this? Thank you!