fancybox icon indicating copy to clipboard operation
fancybox copied to clipboard

Zoom out on double tap on mobile is almost impossible

Open sollerpolt opened this issue 9 years ago • 7 comments

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.

sollerpolt avatar Nov 20 '17 04:11 sollerpolt

Hi,

  1. By "on demo", do you mean demos on the homepage?
  2. 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 :/

fancyapps avatar Nov 20 '17 07:11 fancyapps

Hi,

  1. 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:

  1. Go to Showcase on http://fancyapps.com/fancybox/3/
  2. Tap on image (Lightbox loading)
  3. 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.

sollerpolt avatar Nov 20 '17 08:11 sollerpolt

Thank you for your feedback!

Please, try the latest code from the GitHub (v3.2.8)

fancyapps avatar Nov 21 '17 12:11 fancyapps

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!

sollerpolt avatar Nov 21 '17 12:11 sollerpolt

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.

fancyapps avatar Nov 21 '17 12:11 fancyapps

Double taps are failing - when I try to zoom-out.

Tnx, I understood you. Maybe, 10px is not enough for large images.

sollerpolt avatar Nov 21 '17 12:11 sollerpolt

Hi, The latest commit should improve even more. There is now a small delay, when zooming out, too.

fancyapps avatar Nov 27 '17 13:11 fancyapps