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

What's wrong with the anchor point of photo_view? #174

Closed
ProgrammingLife opened this issue Aug 22, 2019 · 3 comments · Fixed by #189
Closed

What's wrong with the anchor point of photo_view? #174

ProgrammingLife opened this issue Aug 22, 2019 · 3 comments · Fixed by #189
Labels
bug Something isn't working Core: hard Issues that affect the PhotoView core features: zoom, pan and rotation

Comments

@ProgrammingLife
Copy link

I use pretty simple code:

return Scaffold(
      appBar: AppBar(
        title: Text('Simple Photo View'),
      ),
      body: PhotoView(
        imageProvider: AssetImage("assets/images/image.png"),
        //minScale: PhotoViewComputedScale.contained * 0.8,
        //maxScale: PhotoViewComputedScale.covered * 2,
        enableRotation: true,
        backgroundDecoration: BoxDecoration(
          color: Theme.of(context).canvasColor,
        ),
        loadingChild: Center(
          child: CircularProgressIndicator(),
        ),
      ),
    );

And when I rotate and move my image it goes wild. It looks like the anchor point of that image is placed somewhere at the bottom right of my screen. Not the image. It works anyway but it's very uncomfortable to work with image like this.
My screen: 1280x800, my image: 600x300
Galaxy Tab S4

What's wrong with my attempt of applying this plugin?

@ProgrammingLife ProgrammingLife added the bug Something isn't working label Aug 22, 2019
@gppam
Copy link

gppam commented Sep 26, 2019

I think it's the enableRotation that's causing the problem. Here's my situation too.

@ProgrammingLife
Copy link
Author

@gppam I see exactly the same behaviour that you are showing at the video.

@renancaraujo renancaraujo added the Core: hard Issues that affect the PhotoView core features: zoom, pan and rotation label Oct 2, 2019
renancaraujo pushed a commit that referenced this issue Oct 15, 2019
@renancaraujo
Copy link
Member

Released a fix on 0.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Core: hard Issues that affect the PhotoView core features: zoom, pan and rotation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants