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:
@@ -283,6 +283,10 @@ export default class ImageView extends React.Component<IProps, IState> {
|
|||||||
translationX: 0,
|
translationX: 0,
|
||||||
translationY: 0,
|
translationY: 0,
|
||||||
});
|
});
|
||||||
|
this.lastX = 0;
|
||||||
|
this.lastY = 0;
|
||||||
|
this.initX = 0;
|
||||||
|
this.initY = 0;
|
||||||
}
|
}
|
||||||
this.setState({moving: false});
|
this.setState({moving: false});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user