From 86dd81cda08cfb8ae6f37e16dc08bba2dc1ed383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Fri, 9 Apr 2021 08:16:52 +0200 Subject: [PATCH] Fix rotation animation when rotating 360 deg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/views/elements/ImageView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/elements/ImageView.tsx b/src/components/views/elements/ImageView.tsx index 2bcdaf15cc..05e71b67bf 100644 --- a/src/components/views/elements/ImageView.tsx +++ b/src/components/views/elements/ImageView.tsx @@ -137,13 +137,13 @@ export default class ImageView extends React.Component { 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 }); };