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>
This commit is contained in:
parent
abfe6d85a0
commit
1c8e341143
1 changed files with 4 additions and 0 deletions
|
@ -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});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue