Closed byzod closed 5 years ago
Actually, that's what I am thinking too. But busy at work now, and then modified once enough time. thanks.
I fixed it. (However, if the moving distance is short, it times out.) Thanks for your review !
The timeout timer still need yo adjust trigger condition
As mentioned above, the timeout timer should start from the moment that finger of user stop moving
The timeout timer currently (after the patch), however, is starting when a gesture movement detected
. The moment when U-D-R
changes to U-D-R-L
for example, even when user's finger is still moving.
Per the bug mentioned in #55 and the fact that all gesture scripts are page scripts that only available after the page is ready, the current timeout cause problem:
When try to use gestures on zoomed page and some websites (didn't record it, sry) users need to draw bigger glyph to make it work while bigger gesture need longer time to finish each move, thus it tend to timeout before the whole gesture finished.
On some sites that are not well designed, the gesture response slower, user need to draw gesture slower too to make it work. It also lead to unintentional timeout during gesture drawing.
I know that. But, that has a some problems.
I think I should hack somehow and solve the problem when the page is zoomed rather than fix the timeout. (I don't know if there is a way...)
It's difficult to stop your finger completely until it timeout. So the timeout will not work.
I raise my finger off the screen when gesture finished, I think most user behaves like me? If so then this won't be a problem. If not, then "dead zone" solution may helps: if the user moves very slow
for at least x
ms, treat it as "stop".
The fix needs to reset the timer every touch-move event.
Event throttling is fine, for example triggering once every 100ms.
solve the problem when the page is zoomed rather than fix the timeout.
But it still won't help with the "laggy" page.
if the user moves very slow
Event throttling is fine, for example triggering once every 100ms.
This can't catch 'L-R' or 'U-D' in100ms. I consider.
But it still won't help with the "laggy" page
I want to do something, but I need to be carefull for all non laggy pages.
The
timeout
setting is not working as intended.imo the timeout timer should reset it self if the user's finger is still moving
Thus 1000ms timeout means "if the user's finger stop moving for 1 second, stop gesture detection", and that's how it works in most gesture addons (firegesture, quick gesture, etc)
The current logic is, however, "I gave you 1 second to finish your gesture, no matter the gesture is super simple that you need to wait 800ms after finished it or it's super complex that you can barely draw half of it in 1 second", this is counter-intuitive.