Closed aldebout closed 3 years ago
I'm using the react package.
When I scroll the page on which the canvas is present after the game has loaded, subsequent calls to pointer.y get shifted by the scroll amount.
pointer.y
My game config:
{ type: Phaser.AUTO, scale: { mode: Phaser.Scale.FIT, autoCenter: Phaser.Scale.CENTER_BOTH, width: 700, height: 700, }, scene: playGame, }
My jsx:
<IonPhaser style={{ width: '350px', height: '350px', }} key={gameId} game={game} initialize={initialize} />
and the game is basically taken from here.
Edit: After further testing, it's also the case without the position absolute, reflected it in my code.
Can you attach a GitHub repo to be able to reproduce this issue? :)
@aldebout please create a demo to reopen this issue, try here: https://stackblitz.com
I'm using the react package.
When I scroll the page on which the canvas is present after the game has loaded, subsequent calls to
pointer.y
get shifted by the scroll amount.My game config:
My jsx:
and the game is basically taken from here.
Edit: After further testing, it's also the case without the position absolute, reflected it in my code.