mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-13 06:22:17 +03:00
Export ZOOM_STEP into a variable
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
9c313854d0
commit
67a57ead96
1 changed files with 3 additions and 2 deletions
|
@ -33,6 +33,7 @@ import {replaceableComponent} from "../../../utils/replaceableComponent";
|
||||||
|
|
||||||
const MIN_ZOOM = 100;
|
const MIN_ZOOM = 100;
|
||||||
const MAX_ZOOM = 300;
|
const MAX_ZOOM = 300;
|
||||||
|
const ZOOM_STEP = 10;
|
||||||
|
|
||||||
@replaceableComponent("views.elements.ImageView")
|
@replaceableComponent("views.elements.ImageView")
|
||||||
export default class ImageView extends React.Component {
|
export default class ImageView extends React.Component {
|
||||||
|
@ -131,7 +132,7 @@ export default class ImageView extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
zoom: this.state.zoom + 10,
|
zoom: this.state.zoom + ZOOM_STEP,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -145,7 +146,7 @@ export default class ImageView extends React.Component {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
zoom: this.state.zoom - 10,
|
zoom: this.state.zoom - ZOOM_STEP,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue