You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-11 20:22:36 +03:00
Reset translation with zoom out
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
@@ -222,7 +222,11 @@ export default class ImageView extends React.Component {
|
|||||||
if (this.state.zoom === MIN_ZOOM) {
|
if (this.state.zoom === MIN_ZOOM) {
|
||||||
this.setState({zoom: MAX_ZOOM});
|
this.setState({zoom: MAX_ZOOM});
|
||||||
} else {
|
} else {
|
||||||
this.setState({zoom: MIN_ZOOM});
|
this.setState({
|
||||||
|
zoom: MIN_ZOOM,
|
||||||
|
translationX: 0,
|
||||||
|
translationY: 0,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.setState({moving: false});
|
this.setState({moving: false});
|
||||||
|
|||||||
Reference in New Issue
Block a user