-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
A nifty little bug with sprite scaled to 0 & mouse clicks #602
Comments
By the way, another cosmetic bug with the hand cursor in this example. When you try the example with a scale of 0.01 you can see the bunny as a tiny dot. |
And for the records: You should clear the hand cursor style when the sprite gets destroyed & the last reported state was over. A very dirty workaround is clearing the hand cursor yourself just before you destroy the sprite.
|
…er-rode, renamed to World.shutdown and updated StateManager accordingly. World.shutdown now removes all children iteratively, calling destroy on each one, ultimately performing a soft reset of the World. Objects with a scale.x or y of 0 are no longer considered valid for input (fix #602) InputHandler will set the browser pointer back to default if destroyed while over (fix #602) Group.destroy has a new parameter: `soft`. A soft destruction won't remove the Group from its parent or null game references. Default is `false`. InputHandler.validForInput is a new method that checks if the handler and its owner should be considered for Pointer input handling or not. Group.replace will now return the old child, the one that was replaced in the Group.
Well there's a condition I didn't consider before :) (scale zero). Have modified how the input check is done, should be tighter now. Same goes for the hand cursor. |
Pretty sure this is fixed, but please test and let me know. |
Yes Rich. Everything is fixed! Thanks a lot. |
Try the following code. A sprite scaled to zero catches all clicks. You even get a hand cursor on the whole stage. Phaser or Pixi Bug ?
The text was updated successfully, but these errors were encountered: