-
Notifications
You must be signed in to change notification settings - Fork 548
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
Add ability to disable gesture detection #233
Labels
enhancement
New feature or request
Comments
This is a needed feature for me too. @renancaraujo do you have any plans to merge it? |
@votruk Yes, today. |
renancaraujo
pushed a commit
that referenced
this issue
Aug 17, 2020
renancaraujo
added a commit
that referenced
this issue
Aug 17, 2020
Merged on 0.10.1 |
How do I disable the gallery swiping? I see how to disable pinch/pan/zoom on individual images but I can't stop the gallery from swiping. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
I am using photo_view plugin to implement drawing on picture functionality. Use case: user zooms in to specific part of the image and draws something. There are 2 modes - navigate/zoom mode and edit picture mode. I am using
PhotoView.customChild
constructor. In edit mode child has its own gesture recognizer. Problem is, that in edit mode there are picture view and custom child gesture recognizers in the widgets tree and when the user starts drawing for some time child gesture recognizer does not get events. It starts getting events only when it wins in gesture arena.Describe the solution you'd like
I want a property
PhotoView.disableGestures
witch whentrue
removesPhotoView
gesture recognizer from the widgets tree.Describe alternatives you've considered
An alternative solution would be to allow child gesture detector always win. But it would be easier just not to add a gesture recognizer to the widget tree when it is not needed.
Additional context
I was testing reaction to gestures in the app when a child has its own
ScaleGestureRecognizer
. There is a log withdebugPrintGestureArenaDiagnostics = true;
Child gesture recognizer wins only after user draged significant distance in the screen. And that distance is lost (no line is drawed in edit mode).The text was updated successfully, but these errors were encountered: