software-mansion / react-native-reanimated

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

docs: Fix withTiming playground Power slider visibility #6128

Closed patrycjakalinska closed 1 week ago

patrycjakalinska commented 1 week ago

This PR is related to #6126 issue.

The Power slider should be visible when easing or nestedEasing are set to poly. nestedEasing is only visible when easing is set to either in, out or inOut. So when we set easing to in, nestedEasing to poly and then set easing to brezier the Power slider will stay.

To fix that we added reset of nestedEasing value if easing is changed to something other that in, out or inOut

Before:

https://github.com/software-mansion/react-native-reanimated/assets/59940332/326876b6-f0b9-4edc-b793-2b4c8fd0da9f

After:

https://github.com/software-mansion/react-native-reanimated/assets/59940332/579600a1-7db8-48a9-bf68-bfc3a5157826