From 43921e3fccae9fd47c8d86d9156bd3f116ba638c Mon Sep 17 00:00:00 2001 From: kharhamel Date: Wed, 24 Mar 2021 15:51:18 +0100 Subject: [PATCH] FIX: fixed a bug with fullscreen mode --- front/src/WebRtc/CoWebsiteManager.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/front/src/WebRtc/CoWebsiteManager.ts b/front/src/WebRtc/CoWebsiteManager.ts index 9f40c948..d859a2a9 100644 --- a/front/src/WebRtc/CoWebsiteManager.ts +++ b/front/src/WebRtc/CoWebsiteManager.ts @@ -53,7 +53,7 @@ class CoWebsiteManager { } get isFullScreen(): boolean { - return this.verticalMode ? this.height === this.cowebsiteDiv.clientHeight : this.width === this.cowebsiteDiv.clientWidth + return this.verticalMode ? this.height === window.innerHeight : this.width === window.innerWidth; } constructor() { @@ -199,6 +199,7 @@ class CoWebsiteManager { private fullscreen(): void { if (this.isFullScreen) { this.resetStyle(); + this.fire(); //we don't trigger a resize of the phaser game since it won't be visible anyway. HtmlUtils.getElementByIdOrFail(cowebsiteOpenFullScreenImageId).style.display = 'inline'; HtmlUtils.getElementByIdOrFail(cowebsiteCloseFullScreenImageId).style.display = 'none';