ember-cli-image-cropper icon indicating copy to clipboard operation
ember-cli-image-cropper copied to clipboard

Switch from 0.0.13 to 0.0.14 was a breaking change

Open roberkules opened this issue 6 years ago • 3 comments

I just noticed that our image cropper stopped working after re-deploying the web-app... the docs don't mention this breaking change, but I can see that the test in tests/dummy/app/components/avatar-cropper.js was updated.

roberkules avatar Sep 18 '18 16:09 roberkules

Hi @roberkules can you please be more specific? I believe the docs are correct, are they not?

RobbieTheWagner avatar Sep 18 '18 16:09 RobbieTheWagner

Hi @rwwagner90,

in the readme / usage example there's this code block:

getCroppedAvatar: function() {
  var container = this.$(this.get('cropperContainer'));
  var croppedImage = container.cropper('getCroppedCanvas');
  this.set('croppedAvatar', croppedImage);
}

but the dependency changed from cropper (0.0.13) to cropperjs (0.0.14). so the jquery-version of cropper isn't used anymore, thus container.cropper fails (there's no $.fn.cropper).

so that's a breaking change and shouldn't be in a patch release, unless I'm missing something.

roberkules avatar Sep 18 '18 17:09 roberkules

@roberkules I was not aware the API changed when moving away from jQuery. Apologies for that! Would you be interested in helping update the examples/docs for anything you see that might be broken?

RobbieTheWagner avatar Sep 18 '18 20:09 RobbieTheWagner