chrisbanes / haze

A blurring modifier for Compose Multiplatform / Jetpack Compose
https://chrisbanes.github.io/haze/
Apache License 2.0
895 stars 25 forks source link

Position mismatch with scale transform #213

Open kasem-sm opened 1 month ago

kasem-sm commented 1 month ago

Information

Position mismatch with android predictive back gesture. The blur moves along with the back animation while other UI elements are on their respective positions.

PS: I'm using decompose for navigation. The back animation code is similar to this - https://github.com/msasikanth/twine/blob/e5635d10afc3f4d0aea6310ed8c3c67af9a8d249/shared/src/androidMain/kotlin/dev/sasikanth/rss/reader/app/BackAnimation.kt#L42

Screen recording :

https://github.com/chrisbanes/haze/assets/83884225/190a2358-ca81-4ca9-a921-33bd7dc27e5c

ruishi01 commented 1 week ago

@chrisbanes I'm not sure if it's related to this issue, but I found that sometimes when there is global position change to the parent or child, the onPlaced is not called and the position is not updated which causes the blur area being off. Can we inherit GlobalPositionAwareModifierNode to both AndroidHazeNode and HazeChildNode and update the position accordingly as well?

chrisbanes commented 5 days ago

@ruishi01 that doesn't sound related. Just opened #241