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

Prevent CropRect Translation in Image Cropper #620

Open
mans17312 opened this issue Mar 18, 2024 · 5 comments
Open

Prevent CropRect Translation in Image Cropper #620

mans17312 opened this issue Mar 18, 2024 · 5 comments

Comments

@mans17312
Copy link

Description:
Currently, the image cropper allows the CropRect to translate, which can result in unintended changes to the selected area. However, in some cases, users may require a fixed aspect ratio without allowing the CropRect to translate.

Problem:

  1. The CropRect can translate freely, causing the selected area to change size or position unintentionally.
  2. While setFixedAspectRatio exists, it does not prevent the CropRect from translating.

Desired Solution:

  1. Disable the translation of the CropRect while maintaining a fixed aspect ratio.
  2. Even if the user attempts to translate the CropRect, it should remain fixed in size and aspect ratio.
  3. Provide a way to enable/disable this feature programmatically or through configuration options.
@vanniktech
Copy link
Contributor

Hmm this might be the same request as this here, right? #630

@theduc0x
Copy link

theduc0x commented Aug 5, 2024

Yes, that's what I meant too @vanniktech

@vanniktech
Copy link
Contributor

@mans17312 #636 does this also what you want?

@theduc0x
Copy link

theduc0x commented Aug 6, 2024

hello, I think it will still be possible to move CropRect, it's just not possible to change from one crop to another. For example, if I am setting Crop with a ratio of 3:4, it will only maintain that ratio and the user can only move up, down, left and right. Now with the new version, you have blocked all events from entering CropRect @vanniktech

@theduc0x
Copy link

theduc0x commented Aug 6, 2024

hi, I found a function setMinCropResultSize(), then just pass minWidth, minHeight to meet my requirements.

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

No branches or pull requests

3 participants