-
Notifications
You must be signed in to change notification settings - Fork 222
Closed
Labels
awaiting-feedbackThe issue requires more feedback from the original poster.The issue requires more feedback from the original poster.
Description
I am getting some incorrect swipe directions. If I swipe right, this is sometimes interpreted as a swipe up. This happens if I deviate slightly from a flat sideways swipe.
I looked at the code. The problem is in these statements:
if (originalCoord.y > finalCoord.y && (originalCoord.y - finalCoord.y > v_threshold)) {
swipedir = 'swipeup';
}
if (originalCoord.x < finalCoord.x && (finalCoord.x - originalCoord.x > h_threshold)) {
swipedir = 'swiperight';
}
If a slight vertical swipe amount exceeds the threshhold, it is interpreted as swipeup, even though a much greater horizontal swipe occurred.
If there is more horizontal movement than vertical movement, this should be interpreted as swiperight.
Edit:
Actually it is the next 2 statements that "win":
if (originalCoord.y < finalCoord.y && (finalCoord.y - originalCoord.y > v_threshold)) {
swipedir = 'swipedown';
}
So the swiperight is interpreted as swipedown.
Metadata
Metadata
Assignees
Labels
awaiting-feedbackThe issue requires more feedback from the original poster.The issue requires more feedback from the original poster.