How to use hitTest with v7 events
See original GitHub issueBefore v7, we could do renderer.plugins.interaction.hitTest(point)
, do we have something similar in v7?
Issue Analytics
- State:
- Created a year ago
- Comments:12 (11 by maintainers)
Top Results From Across the Web
uiview - Event handling for iOS - how hitTest:withEvent: and ...
In hit-testing, a window calls hitTest:withEvent: on the top-most view of the view hierarchy; this method proceeds by recursively calling ...
Read more >hitTest(_:with:) | Apple Developer Documentation
This method traverses the view hierarchy by calling the point(inside:with:) method of each subview to determine which subview should receive a touch event....
Read more >hitTest(_:with:) vs point(inside:with) | by Steven Curtis - Medium
When a touch event is detected, it starts at the root view controller and calls hitTest(_:with:) on that root view. The subviews are...
Read more >Hacking Hit Tests - Khanlou
-hitTest: uses -pointInside: to tell the caller which subview (if any) would be the receiver for a touch at a given point.
Read more >Hit-Testing in iOS - smnh
iOS uses hit-testing to determine which UIView is the frontmost view under the user's finger that should receive the touch event.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Snowblaze not sure what’s going on with that error. The file is definitely in the package.
But I fixed the example so it runs.
Yeah, the
rootBoundary.rootTarget
is set by theEventSystem
and is the lastObjectRendered:https://github.com/pixijs/pixijs/blob/e5cc328a2374fac1cb21915e8029d8a9bddb038c/packages/events/src/EventSystem.ts#L203
That’s because you could render something other than
app.stage
. If you want to do a synthetic hit test, I would suggest having your own EventBoundary.