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

Switch to non-jQuery version of Cropper

Open GCheung55 opened this issue 7 years ago • 3 comments

Ember is moving away from jQuery. Consider switching to use non-jQuery version of Cropper;

GCheung55 avatar Jan 06 '18 00:01 GCheung55

Definitely a good idea 👍. Do you have any interest in submitting a PR for it?

RobbieTheWagner avatar Jan 07 '18 03:01 RobbieTheWagner

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 avatar Jan 25 '18 14:01 0000marcell

@0000marcell would you mind going ahead and opening a PR, so we can see the diff? I can help try to debug from there.

RobbieTheWagner avatar Jan 25 '18 15:01 RobbieTheWagner