ember-cli-image-cropper
ember-cli-image-cropper copied to clipboard
Switch to non-jQuery version of Cropper
Ember is moving away from jQuery. Consider switching to use non-jQuery version of Cropper;
Definitely a good idea 👍. Do you have any interest in submitting a PR for it?
I was solving this issue, but got stuck... i'm able to use cropperjs and everything works fine but when i call getCroppedCanvas() a second time nothing is returned the relevant code:
getCroppedAvatar() {
let cropper = this.get('cropper'),
croppedImage = cropper.getCroppedCanvas();
this.set('croppedAvatar', croppedImage);
}
and the cropper declaration:
let image = document.querySelector(
properties['cropperContainer']);
this.set('cropper', new Cropper(image, properties));
the second time getCroppedAvatar() runs nothing is returned from getCroppedCanvas() any help is appreciated, the entire code can be seen https://github.com/0000marcell/ember-cli-image-cropper
@0000marcell would you mind going ahead and opening a PR, so we can see the diff? I can help try to debug from there.