Use height and width properties for scaling again

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2020-12-20 10:07:03 +01:00
parent ec5fcaf59b
commit be9b68a4dd
2 changed files with 11 additions and 7 deletions

View file

@ -163,6 +163,10 @@ export default class ImageView extends React.Component {
};
*/
let res;
const style = {
height: this.state.zoom + "%",
width: this.state.zoom + "%",
};
if (this.props.width && this.props.height) {
res = this.props.width + "x" + this.props.height + "px";
@ -213,8 +217,7 @@ export default class ImageView extends React.Component {
}
const rotationDegrees = this.state.rotationDegrees;
const zoom = this.state.zoom/100;
const effectiveStyle = {transform: `rotate(${rotationDegrees}deg) scale(${zoom})`};
const effectiveStyle = {transform: `rotate(${rotationDegrees}deg)`, ...style};
return (
<FocusLock