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

Two taps (within 300ms) at different locations should not trigger zoom #6217

Closed
jfirebaugh opened this issue Feb 23, 2018 · 1 comment
Closed

Comments

@jfirebaugh
Copy link
Contributor

A "double tap zoom" should be triggered only when the touch locations are relatively close to each other.

Also, it should be triggered on the second touchend, not the second touchstart.

vakila pushed a commit that referenced this issue Apr 9, 2019
* Fix/add tests for existing dblclick-zoom functionality

* Add tests for existing dbltap-zoom functionality

* Prevent dbltap-zoom if touch points differ, add test

* Trigger dbltap-zoom on second touchend, add tests

* Increase double-tap maxDelta to 30

* Prevent duplicate zoom on dblclick if double-tap zoom is triggered

* Address review comments from @mourner & @asheemmamoowala

- Use proper Point obj w/ .dist() method
- Remove touchcancel handler on touchend
- Attach touchend/cancel handlers with .once()
- Move distance threshold to top-level constant, add doc comment
- Refactor tests to avoid repetition

* Clarify comments re passing touchstart vs. -end event

* Fix type-only import
@asheemmamoowala
Copy link
Contributor

Closed by #8086

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants