Jump to content

Zoom in on phone browsers


andrei.nicolae
 Share

Recommended Posts

Hi guys,

I'm new to this and I have an issue in my current working project(it's first in phaser). I want to know how can I zoom in the game when it's opened in a mobile browser? The game is too small and I want to zoom and slide the whole canvas in the browser window. I can do this from outside the canvas but I cannot drag then from the canvas itself.

Please help!

Thank you.

Link to comment
Share on other sites

On 8/27/2018 at 8:23 PM, samme said:

If the game canvas initially appears too small you probably want to configure the viewport.

 

Thanks for the reply, this works but does not fit my needs.

My game is a hidden object, it opens ok on mobile browser, it fills right the browser. The game itself needs to be zoomable, so want we want to achieve from a user perspective is the next thing: users touches the canvas with two fingers and expands, then the whole canvas zooms, like any other website, the user will use a finger to pan the image so he can find objects easily in the game. 

In the current state the user can pinch and pan outside the canvas, the canvas scales but it's not responsive itself to pan and zoom. 

I attached a video of how the game works now and showing how it doesn't work when I try touching the canvas.

Thank you!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...