NickT Posted November 21, 2014 Share Posted November 21, 2014 Hi folks, I have a game built in Pixi, pulled into a website in an iFrame. The game takes up most of the screen except for a menu at top and a footer at bottom. The bottom of the game and the footer are off the bottom of the screen and I want the player to be able to scroll / swipe to see the bottom of the game and the footer of the site. It appears that since almost all of the visible screen is the canvas, the swipes are not picked up by the main site and so the site doesn't scroll. Any thoughts on how to get this to work? Thanks, Quote Link to comment Share on other sites More sharing options...
!untrue Posted December 29, 2014 Share Posted December 29, 2014 I've encountered this too. What I ended up doing is modifying pixi.js to not "prevent default" if the tap is also a drag (there are some "if" blocks to work with here). But I had to re-minify the dev version and it's not really ideal to be stuck doing that. The most simple way I've found without modifying pixi.js is to set this at the top of your code.PIXI.AUTO_PREVENT_DEFAULT = false;But it won't prevent touch-scrolls or pinch-zooms from pressing buttons if you touch that area to scroll. It might work for your purposes. Unless there's a way to prevent default on your buttons on an individual basis, which I haven't looked at yet. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.