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

Gestures don't work when ModelViewer is inside ListView #11

Closed
jakub-cosmose opened this issue Mar 10, 2022 · 1 comment · Fixed by #16
Closed

Gestures don't work when ModelViewer is inside ListView #11

jakub-cosmose opened this issue Mar 10, 2022 · 1 comment · Fixed by #16
Labels
bug Something isn't working

Comments

@jakub-cosmose
Copy link

Describe the bug
No scaling or rotating can be done when the component is inside ListView.

To reproduce
Steps to reproduce the behavior:

  1. Put ModelViewer inside ListView, e.g.
         ListView(
          children: [
            Container(
              height: 300,
              child: ModelViewer(
                src: 'modelUrl',
                alt: 'A 3D model',
                ar: false,
                autoRotate: true,
                cameraControls: true,
              ),
            )
          ],
        ),
  1. Try gestures

Expected behavior
Gestures should work

Additional context
The internal WebView should handle all gestures by adding the following property to the constructor:

      gestureRecognizers: <Factory<OneSequenceGestureRecognizer>>{
        Factory<OneSequenceGestureRecognizer>(
              () => EagerGestureRecognizer(),
        ),
      },

Alternatively, there should be a way for the client app to enable that behaviour.

@jakub-cosmose jakub-cosmose added the bug Something isn't working label Mar 10, 2022
Foldblade added a commit to Foldblade/model_viewer_plus.dart that referenced this issue Mar 15, 2022
@Foldblade
Copy link
Collaborator

bc65c0d Thank you for your advice!

omchiii added a commit that referenced this issue Mar 17, 2022
Fix #11 and a less elegant solution of #8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants