Zoom out on double tap on mobile is almost impossible
Hi. I'm planning to use your script in my project.
But on demo I see small issue. On my LG G3 I can't zoom out image on double tap. 99% of double taps make little drag of image, but not zoom out.
Can this be configured somehow? I read docs, but not found any solution.
Tnx.
Hi,
- By "on demo", do you mean demos on the homepage?
- What browser and version are you using?
Well, I do not see any issue, but I`m having the latest Android. And touch related stuff has not been changed for some time and no one else has been reported any issue about this, therefore I am puzzled :/
Hi,
- Yes 2.1. Last version of Google Chrome on Android 6.0, LG G3 2.2. Last version of Google Chrome on Android 7.0, Samsung Galaxy A5 2017
Mayby, I described issue not perfectly. Trying one more time:
- Go to Showcase on http://fancyapps.com/fancybox/3/
- Tap on image (Lightbox loading)
- Double tap on image (Zoom in working) 4.1. Double tap as accurately like a robot (Zoom out working) 4.2. Double tap as a human (Issue here) 4.2.1. First tap (very little drag in random direction) 4.2.2. Second tap (one more little drag in random direction)
I think, that issue is in Double Tap recognition. If tap not accurately in one place or tap and make a little-little drag, you get this bug. I can Double Tap as accurately only one-two times from ten.
For example, PhotoSwipe hasn't this issue. But I want to use your script.
Thank you for your feedback!
Please, try the latest code from the GitHub (v3.2.8)
Hi.
Now I had only 15-20% unrecognized Double Taps instead of 90-99% before. I think, it's good enough for me.
Maybe, before production I will play with this lines of code:
// Skip if distance between taps is too big
if ( Math.abs( tapX - self.tapX ) > 50 || Math.abs( tapY - self.tapY ) > 50 ) {
return this;
}
ret = self.instance.close( true, 300 `);`
Thank you!
btw, when these double taps are failing - when you try to zoom-in or zoom-out?
There is a difference between these two - the script waits for user to move 10px before assuming that user wants to swipe (to calculate the angle). But there is no delay for panning. You can better see this when using pc.
So, if the issue occurs (mostly) when panning, then I guess there is some delay needed.
Double taps are failing - when I try to zoom-out.
Tnx, I understood you. Maybe, 10px is not enough for large images.
Hi, The latest commit should improve even more. There is now a small delay, when zooming out, too.