Fixing "camera popup" always display on resize

This fixes a bug where the "camera popup" window was always displayed when the screen was resized.
This commit is contained in:
David Négrier 2021-05-10 19:05:01 +02:00
parent 58482f8ae6
commit 0411d5e493

View File

@ -109,6 +109,7 @@ export class HelpCameraSettingsScene extends DirtyScene {
public onResize(ev: UIEvent): void {
super.onResize(ev);
if (this.helpCameraSettingsOpened) {
const middleX = this.getMiddleX();
const middleY = this.getMiddleY();
this.tweens.add({
@ -118,6 +119,8 @@ export class HelpCameraSettingsScene extends DirtyScene {
duration: 1000,
ease: 'Power3'
});
this.dirty = true;
}
}
private getMiddleX() : number{