Closed jurajmasar closed 5 years ago
I expect we should be using zoom.clickDistance for this, and only canceling the dbltap if the touchmove moves more than a certain distance from the touchstart position.
Refiled as #180.
And thank you for the suggestion, and apologies for the delayed response. :)
Hi there,
Thanks for this wonderful library!
I think I came across an unexpected behavior when testing it with latest Chrome 64.0.3282.137 on Google Pixel 2 XL, when a single tap generated one
touchstart
event, followed with upto 3touchmove
events.I've tested this on iPhone 6s as well and only a single
touchstart
event was generated by a similar tap.In order to make doubletap zoom work on Pixel, I had to prevent
touchmove
events from being triggered whiletouchstarting
wastrue
, and consequently decreasetouchDelay
to250
to make touch panning less delayed.This isn't a great solution since the value of
touchDelay
now essentially represents a compromise between the lag when panning starts and the permitted length of double-tap.Unfortunately, with this sort of behavior occurring with the new Chrome on Android, I haven't thought of a better solution.
Thanks again!