Closed Azsael closed 1 year ago
@Azsael could you please squash your commits into one without code reformatting. It is very hard to review code with spaces "fixes".
Yea I will do, it got auto formatted and i tried to revert it. :S
Sorry I am not sure about the validity of this change much anymore.
I initially was using the crop function that uses the encode method internally which was then breaking when I was adjusting an already uploaded image.
I had heavily adjusted the crop method to cater for rotate however I encountered that the method had major issues in IE so I ended up stealing the cropper from the built function and using it's cropped method, because it deals with the IE issues and rotation.
i.e. built: function () { cropper = $(this); }
var blob = Cropper.decode(cropper.cropper('getCroppedCanvas', data).toDataURL('image/png'));
I see you added the proxy so I will probably use that now.
@Azsael can you please explain how to use your code?
Oh my I forgot about this.
Pretty much, if you pass a image url instead of a uploaded it would initialise the cropper with the existing image.
Gives ability to both be able to upload images and manipulate those, or use images already on the page. I.e. already uploaded images that user wants to adjust crop/reposition/zoom etc.