Allow user press through lottie animation when pointerEvents='none'#844
Allow user press through lottie animation when pointerEvents='none'#844sdg9 wants to merge 1 commit intolottie-react-native:masterfrom
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
React Native supports pointerEvents but they don't work as expected with
LottieView.Scenario
LottieViewis absolutely positioned with zIndex of 1 so that animations play on top of existing content.pointerEvents="none"prop is added toLottieViewso that lower zIndex components can receive touch events.ViewofLottieView's implementation doesn't receive the prop.Proposed Solution
Let the outermost
Viewreceive thepointerEventsprop.Demo
Before
zIndex 0 never receives touch event.
After
zIndex 0 receives touch event as expected.