You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
It took me a bit of time to verify the swipe or scroll math in index.html before using it in my code. If I understand the formula correctly, you're basically comparing absolute values to see whether finger movement is more pronounced vertically or horizontally. Replacing that code with if(Math.abs(e.distY) > Math.abs(e.distX)){ e.preventDefault();} would make things easier to intuit.
The text was updated successfully, but these errors were encountered:
Hi,
It took me a bit of time to verify the swipe or scroll math in
index.html
before using it in my code. If I understand the formula correctly, you're basically comparing absolute values to see whether finger movement is more pronounced vertically or horizontally. Replacing that code withif(Math.abs(e.distY) > Math.abs(e.distX)){ e.preventDefault();}
would make things easier to intuit.The text was updated successfully, but these errors were encountered: