Skip to content
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

How to enable pinch to zoom? #30

Open
yakeer opened this issue Nov 15, 2020 · 2 comments
Open

How to enable pinch to zoom? #30

yakeer opened this issue Nov 15, 2020 · 2 comments

Comments

@yakeer
Copy link

yakeer commented Nov 15, 2020

How can I add pinch to Zoom?

It seems that it's enabled by default, but I can't get it to work.

Is there any special property I'm supposed to set to PDF()?

@tomasznajda
Copy link

@yakeer It looks like other widget consumes your pinch gestures.

Try to specify PanGestureRecognizer explicitly in gestureRecognizers.

PDF(gestureRecognizers: [Factory(() => PanGestureRecognizer())].toSet())

You can read more about it from here:

  /// Which gestures should be consumed by the pdf view.
  ///
  /// It is possible for other gesture recognizers to be competing with the pdf view on pointer
  /// events, e.g if the pdf view is inside a [ListView] the [ListView] will want to handle
  /// vertical drags. The pdf view will claim gestures that are recognized by any of the
  /// recognizers on this list.
  ///
  /// When this set is empty or null, the pdf view will only handle pointer events for gestures that
  /// were not claimed by any other gesture recognizer.
  final Set<Factory<OneSequenceGestureRecognizer>>? gestureRecognizers;

@myselfuser1
Copy link

This will help https://www.youtube.com/watch?v=gAUVz0U7eyA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants