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

Setting CropperSelection area into Resizable=false, the behavior is not what you expected. #1200

Open
gtechballesca opened this issue Sep 2, 2024 · 0 comments

Comments

@gtechballesca
Copy link

Describe the bug
Sample Code:

    const cropperSelection = this.cropper.getCropperSelection();
    if (cropperSelection) {
      cropperSelection.resizable = false;
    }

This is the code for setting the cropperselection not to be resized. But when you clip the edge of the selection area, you will be able to shrink the size, and then potentially the selection will be resized. So it defies the value you set for "resizable" property.

To Reproduce
Steps to reproduce the behavior:
(1) Follow the steps mentioned on this document on how to consume the CropperJS2
(2) Once you followed, try to get the "CropperSelection" object programmatically, as mentioned above in the description.
(3) Set the "resizable" into false value
(4) Setting this you can only scale or move the image in the selection area and this is expected.
(5) But trying to clip one of the edge in the selection area, and hold it, you will be able to resize the "selection" area, it means it defies the expected behavior for the value you set for this property (resizable).

Expected behavior
It should not resize the "selection" area in my own sense if the resizable is set to false.

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

1 participant