mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-18 06:35:35 +08:00
Reset translation with zoom out
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
7068996b60
commit
2ff34000fd
@ -222,7 +222,11 @@ export default class ImageView extends React.Component {
|
||||
if (this.state.zoom === MIN_ZOOM) {
|
||||
this.setState({zoom: MAX_ZOOM});
|
||||
} else {
|
||||
this.setState({zoom: MIN_ZOOM});
|
||||
this.setState({
|
||||
zoom: MIN_ZOOM,
|
||||
translationX: 0,
|
||||
translationY: 0,
|
||||
});
|
||||
}
|
||||
}
|
||||
this.setState({moving: false});
|
||||
|
Loading…
Reference in New Issue
Block a user