Reset all translation vars

Not doing this would result in jumps because everything would get out of sync

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
pull/21833/head
Šimon Brandner 2021-06-06 08:09:41 +02:00
parent abfe6d85a0
commit 1c8e341143
No known key found for this signature in database
GPG Key ID: 9760693FDD98A790
1 changed files with 4 additions and 0 deletions

View File

@ -283,6 +283,10 @@ export default class ImageView extends React.Component<IProps, IState> {
translationX: 0,
translationY: 0,
});
this.lastX = 0;
this.lastY = 0;
this.initX = 0;
this.initY = 0;
}
this.setState({moving: false});
};