Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scaleManager.isPortrait and scaleManager.isLandscape #6837

Closed
rexrainbow opened this issue Jun 15, 2024 · 2 comments · May be fixed by jonesrussell/nishman#6
Closed

scaleManager.isPortrait and scaleManager.isLandscape #6837

rexrainbow opened this issue Jun 15, 2024 · 2 comments · May be fixed by jonesrussell/nishman#6
Assignees

Comments

@rexrainbow
Copy link
Contributor

rexrainbow commented Jun 15, 2024

Version

  • Phaser Version: 3.80.1
  • Operating system: ios
  • Browser: Safari

Description

4 results (portrait-primary, landscape-primary, portrait-secondary, landscape-secondary) returned when orientation-changed.
However, phaser3 engine tests isPortrait, isLandscape with 'portrait-primary', 'landscape-primary' only (ref)
Thus it will miss 'portrait-secondary', 'landscape-secondary'. In these orientation states, isPortrait, isLandscape are return false.

Test code, rotate mobile device to change orientation

@rexrainbow
Copy link
Contributor Author

@zekeatchan zekeatchan self-assigned this Jun 19, 2024
@zekeatchan
Copy link
Collaborator

zekeatchan commented Jun 19, 2024

Hi @rexrainbow. Thank you for submitting this feature request.

We have implemented:

  1. additional landscape-secondary and portrait-secondary orientation change events
  2. updated the handlers to use the screen.orientation change event

These updates have been pushed to the master branch and will be part of the next release. Do test it out at your convenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants