-
Notifications
You must be signed in to change notification settings - Fork 551
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
[BUG] in gallery, tap is always panning when zoomed #216
Comments
I tried to solve this and came up with a solution. It's not perfect though and has trade off. The issue is that there are basically 3 competing gesture recognizers:
Solution TLDR:
Some explanation... The current implementation of To let the tap recognizer win, we have to play with the pan/scale recognizer However this is not enough. The Here's my take: As I said, this is not perfect as it introduces trade-off variables to prioritize the different recognizers, but it works well enough for me. |
The problem seems to happen only on Android. On my tests your solution works very well on Android, and causes no colateral effects on iOS. |
same issue, but I found that tapdowns are only registered at the bottom corners of the screen |
I'm still having this issue right now, tested on android, version Double tapping an image will zoom in, however, double tapping again will do nothing in 90% of all cases. I have the suspision that the second double tap is counted as a drag as the image moves ever so slightly sometimes |
I am also having the same issue on version 0.11.1, tested on real android device |
I using photo_view package, when I tap once or double tap, it is panning instead. this happens on Samsung phones only. The issue still exist for me. I appreciate any help to fix this. I am using : photo_view: ^0.12.0 |
@renancaraujo Just applied 508d9b7 in the package directory in my project and works perfectly (No issue with tapping or double tapping or panning). That would be great if you apply these changes to the package itself. |
this make magic 🫡. it make it work on samsung tho. but i doubt it's safe to make changes on the package files 🤔🫠. I wonder if you copy the package file on your own project tree? |
Describe the bug
Any tap down, tap up or double tap starts to pan when displaying a zoomed image in a
PhotoViewGallery
.PhotoViewGalleryPageOptions
callbacksonTapUp
andonTapDown
are not called, and it doesn't cycle through zoom on double tap (though all of this works fine when the image is not zoomed in).To Reproduce
1 Open the Gallery example
2 Tap on an image to open it
3 Double tap once to zoom
4 Double tap again
What is the current behavior?
It starts to pan, even for an unnoticeable amount of pixels.
Expected behavior
It should cycle through zoom, just like it does with a regular
PhotoView
(not in a gallery).Which versions of Flutter/Photo View, and which browser / OS are affected by this issue? Did this work in previous versions of Photo View?
Flutter (Channel beta, v1.11.0, on Microsoft Windows [Version 10.0.18363.476], locale en-GB)
It used to work with photo_view v0.7.0, the bug appeared in v0.8.0, and it's still here in v0.9.0.
The text was updated successfully, but these errors were encountered: