Saint_S Posted January 18, 2019 Share Posted January 18, 2019 Hello everyone! :) I'm new to Pixi. And I am trying to develop a simple blog with Vue and Pixi. On screenshots you can see how I'm trying to set event listeners on sprites. Despite the fact that in console we can see that listeners are actually set, when sprites "clicked" event doesn't fire. Please, can someone point me to an mistake? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted January 18, 2019 Share Posted January 18, 2019 Hi! it should work. Most of the time, some DOM element blocks all mouse events from reaching the canvas. Saint_S and mattstyles 2 Quote Link to comment Share on other sites More sharing options...
mattstyles Posted January 18, 2019 Share Posted January 18, 2019 https://caniuse.com/#search=pointerdown Which browser are you using? Its not supported everywhere (although Pixi might shim it I guess). I suspect Ivan's guess is correct and it isnt a browser issue. Quote Link to comment Share on other sites More sharing options...
Saint_S Posted January 21, 2019 Author Share Posted January 21, 2019 Sorry for long response. I'm using Chrome 71, so looks like problem is not with my browser. Can the problem be with propogation? May be event just can't reach my sprite? Btw, you can see how app were created with Vue. Can problem be with this? UPD: oh, nevermind. You was right. Some div just blocked my event. So, problem solved. Thank you! Quote Link to comment Share on other sites More sharing options...
mattstyles Posted January 22, 2019 Share Posted January 22, 2019 When you think a click isn't working, right click and inspect element, I think there are some scenarios where picking doesn't work correctly, but, mostly it highlights what is being clicked. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted January 22, 2019 Share Posted January 22, 2019 dont forget to destroy that app/renderer later 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.