allow scale over 1

This commit is contained in:
Yanzhen Yu
2020-04-05 22:14:28 +08:00
parent b1723e1716
commit 08d21b41ba

View File

@@ -62,7 +62,7 @@
const widthScale = width / frameDimension.width; const widthScale = width / frameDimension.width;
const heightScale = height / frameDimension.height; const heightScale = height / frameDimension.height;
el.style.transform = el.style.transform =
`scale(${Math.min(widthScale, heightScale, 1)})` + `scale(${Math.min(widthScale, heightScale)})` +
'translate(-50%, -50%)'; 'translate(-50%, -50%)';
}, },
fullscreen() { fullscreen() {
@@ -87,7 +87,7 @@
showWarning: true, showWarning: true,
triggerFocus, triggerFocus,
}); });
replayer.on('resize', dimension => replayer.on('resize', (dimension) =>
this.updateScale(replayer.wrapper, dimension), this.updateScale(replayer.wrapper, dimension),
); );
this.set({ this.set({