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

Translation adjustment stuck inside box same shape as crop aspect ratio #83

Closed
lukehutch opened this issue Feb 28, 2023 · 3 comments
Closed

Comments

@lukehutch
Copy link

If I have a photo with a 16:9 aspect ratio, and then I create a CropController with aspectRatio: 1, then the selectable area for the crop is a 1:1 aspect ratio square in the middle of the image (call this the "valid area"). That means that I can zoom in, and manually drag the translation position of the square crop region anywhere within the valid area, but if I try to drag to the left or right of the valid area, the translation animates back to an area within the valid area. This means that the portion of the image to the left and right of the valid area cannot be included in the crop region.

@lukehutch
Copy link
Author

I think the problem is here, in crop.dart:

    final ctl = canvas.topLeft;
    final ctr = canvas.topRight;
    final cbr = canvas.bottomRight;
    final cbl = canvas.bottomLeft;

I think these should be set to the corners of the image, not the corners of the canvas.

@xclud
Copy link
Owner

xclud commented Feb 28, 2023

Hi. This is a dup of #27.

@lukehutch
Copy link
Author

Sorry I didn't see the other bug. Thanks.

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

2 participants