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

replace() function doesn't work with the last version of Cropper JS #120

Open
ethanS06 opened this issue Jun 13, 2022 · 1 comment
Open

Comments

@ethanS06
Copy link

In the last version of Cropper JS, the replace() method of Cropper takes only 1 parameter (url) instead of 2 as used in the VueCropper.js file.
Cropper JS method :

 replace: function replace(url)

VueCropper JS method :

replace: function replace(url) {
      var onlyColorChanged = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

      return this.cropper.replace(url, onlyColorChanged);

To fix that, replace the definition of replace from VueCropperJS by the definition below:

replace: function replace(url) {
    return this.cropper.replace(url);
    }
@Agontuk
Copy link
Owner

Agontuk commented Sep 3, 2022

sorry for the late response, which cropperjs version are you using ? This library supports v1.5.x and replace method has two parameters.

https://github.com/fengyuanchen/cropperjs/blob/main/src/js/methods.js#L95

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