-
-
Notifications
You must be signed in to change notification settings - Fork 183
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 Pointer-Event from propagating #912
Comments
Stop propogation would definitely be a nice feature, and should match the
typical standard used in other libs, e.stopPropagation()
…On Mon, Nov 27, 2017, 02:47 Phil ***@***.***> wrote:
Context
If there are 2 actors overlapping and both listen to pointer events and
the overlapping area is clicked, both receive the click event. This is not
always desirable.
Demo: https://codepen.io/piko_/pen/ooPNaB
Proposal
It would be good to be able to stop the propagation of input events.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#912>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAiaa-4v3Df4CM3Mt6v2TkZz5OcGmgsTks5s6q9qgaJpZM4QrlZp>
.
|
Agreed, it shouldn't be too difficult to include this behavior in our event handling scheme |
I'd like to try this one next, if that's okay. What will I do? |
Yeah if we can follow the spec that will follow our goal of least surprise.
Thanks @pathurs!
…On Fri, Mar 16, 2018 at 4:28 AM Pathurs ***@***.***> wrote:
I'd like to try this one next, if that's okay.
What will I do?
Event.stopPropagation() should work the same way as
https://developer.mozilla.org/en-US/docs/Web/API/Event/stopPropagation
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#912 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAiaa0ODx4NscWPK5LvwS1mtxfEnwgYsks5te4WogaJpZM4QrlZp>
.
|
I will probably do #389 as well as add support for |
Closes #912 ## Changes: - Adds PointerEvent.stopPropagation() functionality that behaves as described at https://developer.mozilla.org/en-US/docs/Web/API/Event/stopPropagation. - `jasmine.d.ts` type definitions are now for Jasmine 2.8.0. It equals to the version used in current development. - Added `jasmine-core` package from `v2.8.0` accordingly to version it should use. - Event propagation made less greedy. - Class `BubblingEvent` added which extends `GameEvent`. - Property scope `Pointer.actorsUnderPointer` changed to private. - New interface `IActorUnderPointer` added, which provides `length` property to old untyped `Pointer.actorsUnderPointer` object - `CapturePointer.update()` method now doesn't propagate event to actor, just verifies pointer events for actor.
Context
If there are 2 actors overlapping and both listen to pointer events and the overlapping area is clicked, both receive the click event. This is not always desirable.
Demo: https://codepen.io/piko_/pen/ooPNaB
Proposal
It would be good to be able to stop the propagation of input events.
The text was updated successfully, but these errors were encountered: