From 05b829da7092009387cda7773973303a3922d8c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Schl=C3=BCter?= Date: Sat, 13 Feb 2021 21:19:45 +0100 Subject: [PATCH] fix multi user videochat mode --- front/dist/resources/style/style.css | 23 +++++++++-------------- front/src/WebRtc/LayoutManager.ts | 2 +- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/front/dist/resources/style/style.css b/front/dist/resources/style/style.css index 4bf05455..e3291ad7 100644 --- a/front/dist/resources/style/style.css +++ b/front/dist/resources/style/style.css @@ -612,10 +612,9 @@ input[type=range]:focus::-ms-fill-upper { } .chat-mode { - display: flex; + display: grid; width: 100%; - flex-wrap: wrap; align-items: flex-start; padding: 1%; @@ -631,24 +630,20 @@ input[type=range]:focus::-ms-fill-upper { .chat-mode > div:hover { margin: 0%; } -.chat-mode.one-col > div { - flex-basis: 98%; +.chat-mode.one-col { + grid-template-columns: repeat(1, 1fr); } -.chat-mode.two-col > div { - flex-basis: 48%; +.chat-mode.two-col { + grid-template-columns: repeat(2, 1fr); } -.chat-mode.three-col > div { - flex-basis: 31.333333%; +.chat-mode.three-col { + grid-template-columns: repeat(3, 1fr); } -.chat-mode.four-col > div { - flex-basis: 23%; -} - -.chat-mode > div:last-child { - flex-grow: 5; +.chat-mode.four-col { + grid-template-columns: repeat(4, 1fr); } /*CONSOLE*/ diff --git a/front/src/WebRtc/LayoutManager.ts b/front/src/WebRtc/LayoutManager.ts index 4587f870..3c4c0ddd 100644 --- a/front/src/WebRtc/LayoutManager.ts +++ b/front/src/WebRtc/LayoutManager.ts @@ -188,7 +188,7 @@ class LayoutManager { } else { HtmlUtils.getElementByIdOrFail('sidebar').style.display = 'none'; HtmlUtils.getElementByIdOrFail('main-section').style.display = 'none'; - HtmlUtils.getElementByIdOrFail('chat-mode').style.display = 'flex'; + HtmlUtils.getElementByIdOrFail('chat-mode').style.display = 'grid'; } for (const div of this.importantDivs.values()) {