TomFiveThumbs Posted March 26, 2014 Share Posted March 26, 2014 Hi all, I discovered the 300ms Delay on tap events when viewing my game through a mobile browser. I added this meta tag: <meta name="viewport" content="width=device-width, user-scalable=no">But now my game is zoomed in to a crazy level. Here's what it looks like on my desktop browser: And here's what it looks like on my mobile browser Any idea on how to fix this up? It seems to take care of the 300ms delay... but as you can see, it poses another problem. Link to comment Share on other sites More sharing options...
Alvin Posted March 26, 2014 Share Posted March 26, 2014 What values did you give the scaleManager, i.e game.scale.maxWidth ? TomFiveThumbs 1 Link to comment Share on other sites More sharing options...
spmurrayzzz Posted March 26, 2014 Share Posted March 26, 2014 Have you considered using touchstart event instead of click? There are downsides with this approach as this event can fire too often (usually can handle this with a healthy mix of throttle or debouncing depending on your use case), but in some cases this approach makes more sense than viewport mangling.Source: https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent#touchstart TomFiveThumbs 1 Link to comment Share on other sites More sharing options...
TomFiveThumbs Posted March 26, 2014 Author Share Posted March 26, 2014 What values did you give the scaleManager, i.e game.scale.maxWidth ? I didn't! I changed the scaling, that cleared it up. Have you considered using touchstart event instead of click? There are downsides with this approach as this event can fire too often (usually can handle this with a healthy mix of throttle or debouncing depending on your use case), but in some cases this approach makes more sense than viewport mangling.Source: https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent#touchstart That did it. Thanks to both of you. I now have a lagging issue still on a phoneGap app made from the code, but that's probably something else, so I'll mark this thread as solved. Thanks again! spmurrayzzz 1 Link to comment Share on other sites More sharing options...
Recommended Posts