Fix rotation animation when rotating 360 deg

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
pull/21833/head
Šimon Brandner 2021-04-09 08:16:52 +02:00
parent 829bef45a2
commit 86dd81cda0
No known key found for this signature in database
GPG Key ID: 9760693FDD98A790
1 changed files with 2 additions and 2 deletions

View File

@ -137,13 +137,13 @@ export default class ImageView extends React.Component<IProps, IState> {
private onRotateCounterClockwiseClick = () => {
const cur = this.state.rotation;
const rotationDegrees = (cur - 90) % 360;
const rotationDegrees = cur - 90;
this.setState({ rotation: rotationDegrees });
};
private onRotateClockwiseClick = () => {
const cur = this.state.rotation;
const rotationDegrees = (cur + 90) % 360;
const rotationDegrees = cur + 90;
this.setState({ rotation: rotationDegrees });
};