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
Allow user press through lottie animation when pointerEvents='none' #844
Conversation
@sdg9 @emilioicai We really need this too 😃 , because we are facing production problems due to pointerEvents not working with LottieView |
Need this ++ |
Hey guys I hope this work for you as it work for me:
So, you just need to wrap it into a |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
. |
Would you please rebase your branch with the master? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
…992) ## Rationale There are a lot of styles being applied behind the scenes resulting in unexpected behaviors. ## Solution Remove the outer layer and pass everything directly to native lottie view ## What is changed? - Removed using Animated API by default in the source code, fixes (#1003) - Fix resize mode in Android - Removed absolute style being applied to the `LottieVIew` - Removed default aspect ratio styling - Removed default width being applied ## What should be done from now? You need to handle everything related to aspect ratio and sizing yourself. The reason for removing all these default values is to avoid confusion when using the library as well as to prevent unexpected behaviors. ## Fixes - #989 - #1003 - #844
…#992) ## Rationale There are a lot of styles being applied behind the scenes resulting in unexpected behaviors. ## Solution Remove the outer layer and pass everything directly to native lottie view ## What is changed? - Removed using Animated API by default in the source code, fixes (#1003) - Fix resize mode in Android - Removed absolute style being applied to the `LottieVIew` - Removed default aspect ratio styling - Removed default width being applied ## What should be done from now? You need to handle everything related to aspect ratio and sizing yourself. The reason for removing all these default values is to avoid confusion when using the library as well as to prevent unexpected behaviors. ## Fixes - lottie-react-native/lottie-react-native#989 - lottie-react-native/lottie-react-native#1003 - lottie-react-native/lottie-react-native#844
…#992) ## Rationale There are a lot of styles being applied behind the scenes resulting in unexpected behaviors. ## Solution Remove the outer layer and pass everything directly to native lottie view ## What is changed? - Removed using Animated API by default in the source code, fixes (#1003) - Fix resize mode in Android - Removed absolute style being applied to the `LottieVIew` - Removed default aspect ratio styling - Removed default width being applied ## What should be done from now? You need to handle everything related to aspect ratio and sizing yourself. The reason for removing all these default values is to avoid confusion when using the library as well as to prevent unexpected behaviors. ## Fixes - lottie-react-native/lottie-react-native#989 - lottie-react-native/lottie-react-native#1003 - lottie-react-native/lottie-react-native#844
React Native supports pointerEvents but they don't work as expected with
LottieView
.Scenario
LottieView
is absolutely positioned with zIndex of 1 so that animations play on top of existing content.pointerEvents="none"
prop is added toLottieView
so that lower zIndex components can receive touch events.View
ofLottieView
's implementation doesn't receive the prop.Proposed Solution
Let the outermost
View
receive thepointerEvents
prop.Demo
Before
zIndex 0 never receives touch event.
After
zIndex 0 receives touch event as expected.