Use window and not viewport in css for main-container

This commit is contained in:
GRL 2021-06-14 15:54:22 +02:00
parent f103a919f2
commit 281b8580cd
2 changed files with 6 additions and 5 deletions

View File

@ -44,8 +44,8 @@ class WaScaleManager {
// Resize the game element at the same size at the canvas // Resize the game element at the same size at the canvas
const gameStyle = HtmlUtils.getElementByIdOrFail<HTMLDivElement>('game').style; const gameStyle = HtmlUtils.getElementByIdOrFail<HTMLDivElement>('game').style;
gameStyle.height = style.height;
gameStyle.width = style.width; gameStyle.width = style.width;
gameStyle.height = style.height;
// Note: onResize will be called twice (once here and once is Game.ts), but we have no better way. // Note: onResize will be called twice (once here and once is Game.ts), but we have no better way.
for (const scene of this.game.scene.getScenes(true)) { for (const scene of this.game.scene.getScenes(true)) {

View File

@ -337,13 +337,14 @@ video.myCamVideo{
/* New layout */ /* New layout */
body { body {
margin: 0; margin: 0;
height: 100vh; height: 100%;
width: 100vw; width: 100%;
} }
.main-container { .main-container {
height: 100vh; height: 100%;
width: 100vw; width: 100%;
position: absolute; position: absolute;
background-color: #00d4ff;
} }
@media (min-aspect-ratio: 1/1) { @media (min-aspect-ratio: 1/1) {