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
In the iOS photos app and Telegram app, the rotate button will always rotate the image by 90°, regardless of whether the user has previously adjusted the rotation via the slider.
However, the rotate left/right buttons in react-mobile-cropper will only rotate by 90° if the rotation slider is set to exactly 0°.
Reproduction steps
Set the rotation slider to -20°.
Press the 'rotate left' button.
Current behaviour
The rotation slider is reset to 0° and the image rotation is 'snapped' to -90°.
Expected behaviour
The rotation slider should still be set to -20° and the image should be rotated to -110°.
Additional context
This appears to be intentional behaviour, based on the rotateLeft and rotateRight functions in Navigation.tsx.
Changing these functions to always rotate by 90° introduces a new issue where the useLayoutEffect miscalculates the new adjustmentAngle if the rotation slider is set to exactly -45° or 45°.
The text was updated successfully, but these errors were encountered:
In the iOS photos app and Telegram app, the rotate button will always rotate the image by 90°, regardless of whether the user has previously adjusted the rotation via the slider.
However, the rotate left/right buttons in
react-mobile-cropper
will only rotate by 90° if the rotation slider is set to exactly 0°.Reproduction steps
Current behaviour
The rotation slider is reset to 0° and the image rotation is 'snapped' to -90°.
Expected behaviour
The rotation slider should still be set to -20° and the image should be rotated to -110°.
Additional context
This appears to be intentional behaviour, based on the
rotateLeft
androtateRight
functions in Navigation.tsx.Changing these functions to always rotate by 90° introduces a new issue where the
useLayoutEffect
miscalculates the newadjustmentAngle
if the rotation slider is set to exactly -45° or 45°.The text was updated successfully, but these errors were encountered: