You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.
Hi, I think there is a problem with the scope of an image cropper. When a new cropper is instantiated, it does so with the defaults. However because the scope isn't isolated, on line 175 of angular-image-cropper.js, if (this.imageHasToFit()) { this.fitImage(); this.centerImage(); }
this apparently points to both image croppers. So if you have imageHasToFit as true, both images will be zoomed out.
This issue not only affects the defaults. All listeners are bound to this, so if you try rotating after adding another cropper, it will rotate 180 degrees instead of 90.
This is a serious issue for anyone trying to have multiple croppers on the same page. I currently don't have a solution, and I'm not sure my javascript is at the level to implement one, however if I find something I'll let you know. The solution should probably consist of isolating the scope in some way.
Hi,
when adding new image croppers to the page, the existing image croppers zooms out if it's zoomed in.
Codepen: https://codepen.io/anon/pen/MybPwK
To reproduce the issue, zoom in the existing image cropper and then click the "Add one more" button.
The text was updated successfully, but these errors were encountered: