-
-
Notifications
You must be signed in to change notification settings - Fork 167
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
Bug: pointer events not working on Graphics without a sprite #402
Comments
same issue. adding sprite to the stage fixes the issue. |
I'm got a similar issue. Sprite will cease to be interactive sometimes. Like if I reload vscode all Sprite interactions cease (seriously.. that's the observed behaviour). For some totally weird reason adding a useState and array of clicks and rendering them in a list brings the interactivity back. I have no idea how to begin to debug this. But there is definitely a bug somewhere in the click handler |
I've got a reproduction and a new issue here: #416 |
Hey there, I believe I've experienced this same issue. Including a texture-backed |
might be related to |
I ran into this interactive graphics issue and after some trial and error I've found another workaround. For whatever reason, this call to
|
I wasn't able to make the Graphics element interactive with any of the above methods. After adding all three of these props I can now click Graphics. Note the required hitArea prop.
|
Can confirm I have the same issue as @fergusmeiklejohn
fixes the issue for me |
Current Behavior
Creating a simple Stage with one or more interactive Graphics with a pointer event handler will not actually make the Graphics interactive. Only when at least one Sprite is present on the Stage, all interactive elements work as expected.
Expected Behavior
I expect interactive elements to be interactive without being dependent on other elements that are on the Stage.
Steps to Reproduce
Reproduction: https://codesandbox.io/p/sandbox/mystifying-shockley-4kcn68
Environment
@pixi/react
version: 7.0.1pixi.js
version: 7.1.2React
version: e.g. 18.2.0ReactDOM
version: 18.0.10Possible Solution
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: