software-mansion / react-native-reanimated

React Native's Animated library reimplemented
https://docs.swmansion.com/react-native-reanimated/
MIT License
8.89k stars 1.3k forks source link

Fix location after shared element transition #6010

Closed piaskowyk closed 4 months ago

piaskowyk commented 4 months ago

Summary

This pull request addresses the restoration of component location after a shared transition. Previously, the component offset was restored based on the absolute position of the component on the screen. However, this method is more suitable for positioning components absolutely. When the component is reattached to its original parent, we now aim to restore the offset from the parent instead of the global offset from the screen border.

before after