-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop click event propagation #1291
Comments
Hi there! pixi v3 now has |
Would this also work with events like mousemove? x.mousemove = (e) ->
e.stopPropegation() Does not seem to work in v3rc4 (undefined) |
@GoodBoyDigital great to here! |
@perara It wasn't added in rc4, was added to the latest dev. |
@englercj Thanks. Works fine! |
Does stopPropagation() work between events? For example, if I have stage and box (box being a child of stage), and stage allows you to drag using mouseup, mousedown, and mousemove while box just has a click on it. If i use stopPropagation in the box click method, will it prevent all three events on stage? Or will it just prevent everything that would happen after the click fires (i.e. mouseup on stage)? |
It should only prevent the |
Cool thanks, that's what I thought but just wanted to make sure. Cheers! |
should be |
Is there a way to stop propagation of other events, specifically mouseover? |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi, I know that there was several topics about event bubbling and stoping its propagation but I have not found solution for my problem. Here is an example scene http://jsfiddle.net/Jagi/2az8rgr4/6/ with Box child added to the Stage. Both Box and Stage have
click
event assigned. When I click Box the click event is triggered first on the Stage and later on the Box. This is totally confusing. Event bubbling should work different way:Box -> Stage -> Box
. Now it'sStage -> Box
. More over I can't stop propagation. I've read about InteractionManager and maybe it's a way of solving my problem. But I haven't found any example of using it in proper way with Pixi 2.2. Could anyone help?The text was updated successfully, but these errors were encountered: