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:
commit
b0ee4fc633
1 changed files with 4 additions and 0 deletions
|
@ -31,6 +31,10 @@ export class WaScaleManager {
|
||||||
height: height * devicePixelRatio,
|
height: height * devicePixelRatio,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (gameSize.width == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.actualZoom = realSize.width / gameSize.width / devicePixelRatio;
|
this.actualZoom = realSize.width / gameSize.width / devicePixelRatio;
|
||||||
|
|
||||||
this.scaleManager.setZoom(realSize.width / gameSize.width / devicePixelRatio);
|
this.scaleManager.setZoom(realSize.width / gameSize.width / devicePixelRatio);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue