GoodBoyDigital/pixi.js — pull request #456 by peci1 (2013-12-23 02:33:23+00:00)
Title: InteractionManager: bubbling events more in the W3C way, in a tree-like and layer-like manner.

Hello, GoodBoy.

I've found out that the event bubbling mode in pixi.js is kinda weird. Even with the event-stops branch merged in it seems it is simply possible for an ancestor element to receive an event sooner than its descendant.

I think this is not what people (especially web developers) expect to happen. Because, e.g., in the W3C event model, first, the topmost element under cursor is found, and then the event gets processed by that element. Only if that element allows bubbling, the event goes up to its ancestors.

So I tried to implement this functionality. It needs some more testing, especially the touch part, because I don't have any touch devices to try it on.

But be aware that this change may break backward compatibility of some older apps if they depend on the event handling order. Maybe just the existing branch event-stops, or a brand new one, is much better to pull into than master or dev.

Merryc Xmas ;)