# Rotating Phone Seems To Affect Zoom

**URL:** <https://phaser.discourse.group/t/rotating-phone-seems-to-affect-zoom/11907>\
**Category:** Phaser 3\
**Created:** [June 23, 2022, 3:22am UTC](https://phaser.discourse.group/t/rotating-phone-seems-to-affect-zoom/11907 "2022-06-23T03:22:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mschilli](https://avatars.discourse-cdn.com/v4/letter/m/d26b3c/32.png) [@mschilli](https://phaser.discourse.group/u/mschilli)\
**Post date:** [June 23, 2022, 3:22am UTC](https://phaser.discourse.group/t/rotating-phone-seems-to-affect-zoom/11907/1 "2022-06-23T03:22:08Z")

</div>

I don’t know exactly how to ask this question , because I don’t think it is actually the Phaser specific zoom variable thats afffected. However , I have this event listener to resize my game.

```javascript
window.addEventListener('resize', function (event) {
  let newWidth = window.innerWidth
  let newHeight = window.innerHeight 

  if((newWidth % 2) != 0) newWidth--
  if((newHeight % 2) != 0) newHeight--

  game.scale.resize(newWidth , newHeight)
 }, false);

```

If I flip my phone from vertical , to horizontal , and back to vertical the game appears to be zoomed way out. Can anyone give me insight or lead me down the path to fixing this? (Pictures below)

**Original Vertical Orientation**

 ![img-part1](https://global.discourse-cdn.com/free1/uploads/phaser1/original/2X/b/b8e88881c8e70987689b3da9919089249d8ce29c.jpeg)

**Rotated phone sideways**

 ![img-part2](https://global.discourse-cdn.com/free1/uploads/phaser1/original/2X/3/32a38e907c4b5d4a10b77c3a2cfe73875397d4ca.jpeg)

**Rotated Phone Vertical once more**

 ![img-part3](https://global.discourse-cdn.com/free1/uploads/phaser1/original/2X/c/c8aa9479057f2670bd15ce8bcc96115bca2e6998.jpeg)

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [June 23, 2022, 3:37pm UTC](https://phaser.discourse.group/t/rotating-phone-seems-to-affect-zoom/11907/2 "2022-06-23T15:37:27Z")

</div>

I think you can try

```javascript
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">

```

---

<div class="post-metadata">

**Author:** ![mschilli](https://avatars.discourse-cdn.com/v4/letter/m/d26b3c/32.png) [@mschilli](https://phaser.discourse.group/u/mschilli)\
**Post date:** [June 24, 2022, 1:44am UTC](https://phaser.discourse.group/t/rotating-phone-seems-to-affect-zoom/11907/3 "2022-06-24T01:44:14Z")

</div>

Thanks Samme! thats exactly what I needed , I had an `initial-scale=1` instead of a minimum and maximum.
