WIP: Update style for mobile (#942)

* Update style for mobile

 - Update style for mobile modale

* Fix overscroll

* Change css properties overflow

* Revert "Change css properties overflow"

This reverts commit 612fcc7e007fb03c7f72e5fa4b8a0604a184ae7d.

* rm image

* Update view mobile

* Fix CI
This commit is contained in:
grégoire parant 2021-04-27 23:58:33 +02:00 committed by GitHub
parent 4e09246c7f
commit 9b69910cb8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 74 additions and 43 deletions

View file

@ -10,6 +10,7 @@ import { getAllCompanionResources } from "../Companion/CompanionTexturesLoadingM
import {touchScreenManager} from "../../Touch/TouchScreenManager";
import {PinchManager} from "../UserInput/PinchManager";
import { MenuScene } from "../Menu/MenuScene";
import { RESOLUTION } from "../../Enum/EnvironmentVariable";
export const SelectCompanionSceneName = "SelectCompanionScene";
@ -125,7 +126,7 @@ export class SelectCompanionScene extends ResizableScene {
companion.setInteractive().on("pointerdown", () => {
this.currentCompanion = i;
this.updateSelectedCompanion();
this.moveCompanion();
});
this.companions.push(companion);
@ -240,12 +241,12 @@ export class SelectCompanionScene extends ResizableScene {
}
private getMiddleX() : number{
return (this.game.renderer.width / 2) -
return (this.game.renderer.width / RESOLUTION) -
(
this.selectCompanionSceneElement
&& this.selectCompanionSceneElement.node
&& this.selectCompanionSceneElement.node.getBoundingClientRect().width > 0
? (this.selectCompanionSceneElement.node.getBoundingClientRect().width / 4)
? (this.selectCompanionSceneElement.node.getBoundingClientRect().width / (2*RESOLUTION))
: 150
);
}