mirror of https://github.com/vector-im/riot-web
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
parent
abfe6d85a0
commit
1c8e341143
|
@ -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});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue