Closed david-lorenzo88 closed 6 years ago
What are you doing?
Hello,
I am using your plugin to crop an image in a modal. I am using your crop example with the php side script. But coordinates sent by cropped.js when rotation angle is greater than 90° are incorrect . As O explained you in the pull request.
Best David
El 9 ene. 2018 12:21, "Chen Fengyuan" notifications@github.com escribió:
What are you doing?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fengyuanchen/cropper/pull/950#issuecomment-356268997, or mute the thread https://github.com/notifications/unsubscribe-auth/AA94V99ni_GywxXDMZrKeeteKfjF5PE5ks5tI1nDgaJpZM4RWziu .
I mean why pull the commits that I had already committed before again?
Ok maybe I did the wrong thing to submit the change. In the version I downloaded a week ago is not corrected. The version number of cropper.js is 3.1.3 from 2017-10-21
El 9 ene. 2018 12:57, "Chen Fengyuan" notifications@github.com escribió:
I mean why pull the commits that I had already committed before?
And I had already fixed this problem about a month ago https://github.com/fengyuanchen/cropper/pull/950/commits/91a76392992a6bec19bd9630360a173ee1ecce1f !
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fengyuanchen/cropper/pull/950#issuecomment-356276646, or mute the thread https://github.com/notifications/unsubscribe-auth/AA94Vxu5PuL7euxjpkBczoT-J3rcpoNMks5tI2I6gaJpZM4RWziu .
The problem is fixed but not release yet.
Ok sorry for the confusion.
El 9 ene. 2018 13:10, "Chen Fengyuan" notifications@github.com escribió:
The problem is fixed but not release yet.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fengyuanchen/cropper/pull/950#issuecomment-356279505, or mute the thread https://github.com/notifications/unsubscribe-auth/AA94V4Jxd9aoklC5_DOLAh7MNSQhFKWgks5tI2VEgaJpZM4RWziu .
Hello, There's a small bug that apply only for rotation angles greater than 90 degrees or less than -90º, and generates and incorrect crop coordinates that when sent to the server side, derivates in incorrect cropped images.
The bug is located in getRotatedSizes function of cropper.js:
Lastly, when converting degrees to radians, we need to get the inverted angle when the original angle is greater than 90º.
This is the modified function: