From 04448c3c503401e205d5896addaf3035ab2de079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Wed, 5 May 2021 15:46:02 +0200 Subject: [PATCH] Fixing button position in webcam setting page --- front/src/Phaser/Login/EnableCameraScene.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/front/src/Phaser/Login/EnableCameraScene.ts b/front/src/Phaser/Login/EnableCameraScene.ts index 5d5bfa4f..1af0c092 100644 --- a/front/src/Phaser/Login/EnableCameraScene.ts +++ b/front/src/Phaser/Login/EnableCameraScene.ts @@ -246,6 +246,11 @@ export class EnableCameraScene extends Phaser.Scene { this.arrowUp.x = this.microphoneNameField.x - this.microphoneNameField.width / 2 - 16; this.arrowUp.y = this.microphoneNameField.y; + + const actionBtn = document.querySelector('#enableCameraScene .action'); + if (actionBtn !== null) { + actionBtn.style.top = (this.scale.height - 65) + 'px'; + } } update(time: number, delta: number): void { @@ -259,6 +264,7 @@ export class EnableCameraScene extends Phaser.Scene { duration: 1000, ease: 'Power3' }); + } private login(): void { @@ -286,12 +292,12 @@ export class EnableCameraScene extends Phaser.Scene { } private getMiddleX() : number{ - return (this.game.renderer.width / RESOLUTION) - + return (this.scale.width / 2) - ( this.enableCameraSceneElement && this.enableCameraSceneElement.node && this.enableCameraSceneElement.node.getBoundingClientRect().width > 0 - ? (this.enableCameraSceneElement.node.getBoundingClientRect().width / (2*RESOLUTION)) + ? (this.enableCameraSceneElement.node.getBoundingClientRect().width / 2 / this.scale.zoom) : (300 / RESOLUTION) ); }