diff --git a/front/src/Phaser/Menu/MenuScene.ts b/front/src/Phaser/Menu/MenuScene.ts index 6ed26730..58e7f0a6 100644 --- a/front/src/Phaser/Menu/MenuScene.ts +++ b/front/src/Phaser/Menu/MenuScene.ts @@ -140,7 +140,7 @@ export class MenuScene extends Phaser.Scene { this.warningContainer?.destroy(); this.warningContainer = null this.warningContainerTimeout = null - }, 2000); + }, 120000); } diff --git a/front/src/WebRtc/CoWebsiteManager.ts b/front/src/WebRtc/CoWebsiteManager.ts index d859a2a9..8297257f 100644 --- a/front/src/WebRtc/CoWebsiteManager.ts +++ b/front/src/WebRtc/CoWebsiteManager.ts @@ -73,7 +73,7 @@ class CoWebsiteManager { private initResizeListeners() { const movecallback = (event:MouseEvent) => { - this.verticalMode ? this.height -= event.movementY : this.width -= event.movementX; + this.verticalMode ? this.height -= event.movementY / this.getDevicePixelRatio() : this.width -= event.movementX / this.getDevicePixelRatio(); this.fire(); } @@ -91,6 +91,12 @@ class CoWebsiteManager { this.resizing = false; }); } + + private getDevicePixelRatio(): number { + //on chrome engines, movementX and movementY return global screens coordinates while other browser return pixels + //so on chrome-based browser we need to adjust using 'devicePixelRatio' + return window.navigator.userAgent.includes('Firefox') ? 1 : window.devicePixelRatio; + } private close(): void { this.cowebsiteDiv.classList.remove('loaded'); //edit the css class to trigger the transition