Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Emulate double click from touch devices (#1787)
Resolves #1781. This PR improves double-click emulation so that both of the consecutive mouse (touch) events have the exact same location. On a touch device, you might otherwise accidentally direct the second click to a slightly different location, or the target operating system might not even recognise both clicks as proper double click. ## Notes - I’ve slightly re-ordered the commentary, which I thought was sensible due to the increased complexity in the file. - The parameters for detecting a double-click are heuristic at best – the 500ms delay is from [this article](https://en.wikipedia.org/wiki/Double-click#:~:text=rely%20upon%20it.-,Speed%20and%20timing,basis%20for%20other%20timed%20actions.), and the 500px distance just felt okay when trying from an iPad. I’ve tested with this on an iPad, so from my side a pure code review would suffice. <a data-ca-tag href="https://codeapprove.com/pr/tiny-pilot/tinypilot/1787"><img src="https://codeapprove.com/external/github-tag-allbg.png" alt="Review on CodeApprove" /></a> --------- Co-authored-by: Jan Heuermann <[email protected]>
- Loading branch information