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

Fixed rotate screen issue in Android. #32268

Merged
merged 1 commit into from Dec 4, 2019
Merged

Conversation

jmkulwik
Copy link
Contributor

@jmkulwik jmkulwik commented Dec 4, 2019

Description

Issue

Previously, two PRs had been made to make the "Rotate Screen" image display correctly on iOS Safari.
#32206
#32240

Those PRs, however, broke the same levels on Android mobile if you load those levels in landscape mode. This happened because iOS sets screen.width to the shortest screen measurement and screen.height to the longest. Android sets screen.width to the horizontal screen measurement and screen.height to the vertical measurement.



Fix

This PR fixes that issue by explicitly choosing the width for scaling purposes to be the shortest screen measurement.



Links

Testing story

Reviewer Checklist:

  • Tests provide adequate coverage
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

Copy link
Member

@breville breville left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noting that a quick review of this on my real iPhone showed it still working correctly for Oceans, and we saw on another Android phone that while the play area was a bit small, it didn't make the tutorial fit on the screen which is better than overflowing it since Android doesn't support panning/zooming this viewport.

@jmkulwik jmkulwik merged commit d8f6fef into staging Dec 4, 2019
@jmkulwik jmkulwik deleted the maze-fix-rotation-image branch December 4, 2019 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants