Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Double Click Detection #107

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

TiFu
Copy link

@TiFu TiFu commented Dec 26, 2017

This PR fixes the issues described in #66. This also fixes an additional issue:
If the user lifts the pen to start another stroke (e.g. when writing a T: first the vertical line, then the horizontal line) and less than the double click threshold milliseconds elapsed, the screen was cleared.

This is achieved by calculating the distance between the two click events: The screen is cleared if and only if the distance between two clicks is small (75 squared distance in this implementation) and the time between the clicks is less than the threshold (unchanged compared to master).

If you want me to refactor ̀isDoubleClick as discussed in #91, I can do that later this week (and, if wanted, also fix the setIsEmpty issue from #91).

@TiFu TiFu force-pushed the fixDoubleClickDetection branch from 71f7c72 to f1c53b0 Compare December 26, 2017 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant