Merge pull request #1696 from ngc4622/iframe-division-by-zero

ScaleManager: do not apply new size if width is zero
This commit is contained in:
David Négrier 2022-01-03 16:01:01 +01:00 committed by GitHub
commit b0ee4fc633
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,6 +31,10 @@ export class WaScaleManager {
height: height * devicePixelRatio,
});
if (gameSize.width == 0) {
return;
}
this.actualZoom = realSize.width / gameSize.width / devicePixelRatio;
this.scaleManager.setZoom(realSize.width / gameSize.width / devicePixelRatio);