Zoom in on phone browsers

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.

Share this post

Link to post
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!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.