Bug: changing the hitArea
prop does not change the hit area of the underlying pixi element
#563
Labels
v8
Issues related to Pixi React v8
Current Behavior
When supplying the
hitArea
prop withhitArea={new Rectangle(0, 0, width, height)}
to an element, the hit area does not actually change if the width or height change after the first render of the component.Expected Behavior
The hit area of the element corresponds to the rectangle supplied to the
hitArea
prop.As a workaround I created this hook, which is rather inconvenient, but it works.
Steps to Reproduce
After clicking at the bottom of the rectangle, one can still click outside of the rectangle after it shrinks.
Unfortunately I cannot get the sandbox to run, but this example should demonstrate the problem.
Environment
@pixi/react
version:8.0.0-beta.21
pixi.js
version:^8.6.6
React
version:^19.0.0
ReactDOM
version:^19.0.0
Possible Solution
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: