diff --git a/front/src/Phaser/Menu/HelpCameraSettingsScene.ts b/front/src/Phaser/Menu/HelpCameraSettingsScene.ts index 429e197b..6e80b8d4 100644 --- a/front/src/Phaser/Menu/HelpCameraSettingsScene.ts +++ b/front/src/Phaser/Menu/HelpCameraSettingsScene.ts @@ -109,15 +109,18 @@ export class HelpCameraSettingsScene extends DirtyScene { public onResize(ev: UIEvent): void { super.onResize(ev); - const middleX = this.getMiddleX(); - const middleY = this.getMiddleY(); - this.tweens.add({ - targets: this.helpCameraSettingsElement, - x: middleX, - y: middleY, - duration: 1000, - ease: 'Power3' - }); + if (this.helpCameraSettingsOpened) { + const middleX = this.getMiddleX(); + const middleY = this.getMiddleY(); + this.tweens.add({ + targets: this.helpCameraSettingsElement, + x: middleX, + y: middleY, + duration: 1000, + ease: 'Power3' + }); + this.dirty = true; + } } private getMiddleX() : number{