ketys Posted September 11, 2015 Share Posted September 11, 2015 Hello, I've got a simple webpage, where's my mobile game in pixi.js. My problem is that when user doesn't want to play another round, he cannot scroll down on the webpage, because of canvas gathering touch inputs. How can I stop it and enable user's scrolling? Thanks a lot Quote Link to comment Share on other sites More sharing options...
ketys Posted September 12, 2015 Author Share Posted September 12, 2015 nobody knows? Quote Link to comment Share on other sites More sharing options...
xerver Posted September 12, 2015 Share Posted September 12, 2015 Turn the interaction manager off, capture the events before they enter the context pixi is listening for, lots of different options. What have you tried? Quote Link to comment Share on other sites More sharing options...
ketys Posted September 13, 2015 Author Share Posted September 13, 2015 Ok, thanks for hint (interaction manager) ...renderer.plugins.interaction.destroy();renderer.plugins.interaction = new PIXI.interaction.InteractionManager(renderer)But it doesn't works at all ... If I stop the viewport on the canvas, I cannot scroll again Quote Link to comment Share on other sites More sharing options...
xerver Posted September 13, 2015 Share Posted September 13, 2015 The code you posted destroys and recreates the interaction manager, I thought you wanted to stop it? Like, just destroy it. Quote Link to comment Share on other sites More sharing options...
ketys Posted September 13, 2015 Author Share Posted September 13, 2015 Yes, I destroyed it, but I've got a DOM button element to start game :-) so the second line is called when the user press the start button. Quote Link to comment Share on other sites More sharing options...
xerver Posted September 14, 2015 Share Posted September 14, 2015 Well not sure what to say, because I don't know what isn't working. "If I stop the viewport on the canvas, I cannot scroll again" doesn't really make any sense.. 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.