cstefanache / angular2-img-cropper

Angular 2 Image Cropper
MIT License
364 stars 135 forks source link

How can I detect image loading is complete when the image size is too large. #259

Open vitaliibronsky opened 6 years ago

vitaliibronsky commented 6 years ago

I am trying to load large image on cropper component. I am setting the image using $this.cropper.setImage(image); but I can't the loading complete event in setImage. How can I detect this event on frontend side? Regards.

marcus29200 commented 6 years ago

This should do it for you.

var that = $this; image.onload = function() { that.cropper.setImage(image); }