1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-11 20:22:36 +03:00

Set max zoom

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner
2020-12-20 20:28:19 +01:00
parent 096fb33397
commit 3d62138cbd

View File

@@ -91,6 +91,11 @@ export default class ImageView extends React.Component {
});
return;
}
if (newZoom >= 300) {
this.setState({zoom: 300});
return;
}
this.setState({
zoom: newZoom,
});
@@ -138,6 +143,11 @@ export default class ImageView extends React.Component {
};
onZoomInClick = () => {
if (this.state.zoom >= 300) {
this.setState({zoom: 300});
return;
}
this.setState({
zoom: this.state.zoom + 10,
});