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

Uncaught RangeError: Maximum call stack size exceeded. #1015

Closed
HybridSolutions opened this issue Dec 21, 2022 · 2 comments
Closed

Uncaught RangeError: Maximum call stack size exceeded. #1015

HybridSolutions opened this issue Dec 21, 2022 · 2 comments

Comments

@HybridSolutions
Copy link

HybridSolutions commented Dec 21, 2022

I've seen this issue reported here but not because of the same motive.
Going from the demo here, if I try ro resize to the minimum size, this issue occurs. It does not happen when trying to resize past the maximum size. The behaviour is very noticeable when using big images but also happened with images that are bigger than one of the maximum sizes (width or height).

Any idea how to fix this? I know it's very big images but even so, it would be great to have it working without the issue.

Thanks and congrats for the project!

@fengyuanchen
Copy link
Owner

For size computing, you may need to fix this problem first: https://0.30000000000000004.com/.

Take the demo for example:

var cropper = new Cropper(image, {
  // ...
  crop: function (event) {
    // var width = event.detail.width;
    // var height = event.detail.height;
    var width = Math.round(event.detail.width);
    var height = Math.round(event.detail.height);
    // ...
  },
});

@HybridSolutions
Copy link
Author

For size computing, you may need to fix this problem first: https://0.30000000000000004.com/.

Take the demo for example:

var cropper = new Cropper(image, {
  // ...
  crop: function (event) {
    // var width = event.detail.width;
    // var height = event.detail.height;
    var width = Math.round(event.detail.width);
    var height = Math.round(event.detail.height);
    // ...
  },
});

That fixed it. You should update the demo example. Thank you!

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