mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-04 22:56:32 +08:00
Fix LayoutAnimation delete scaleXY animation
Summary: This fix the issue https://github.com/facebook/react-native/issues/11066. It's more a workaround but it fixes the scaling down animation on component unmount using LayoutAnimation.  Closes https://github.com/facebook/react-native/pull/11073 Differential Revision: D4226704 fbshipit-source-id: 64c7663411cc5e703c3ae8a6d3d4de0f0bcf6c96
This commit is contained in:
committed by
Facebook Github Bot
parent
f2a46b17d4
commit
fc23784fe7
@@ -816,7 +816,7 @@ RCT_EXPORT_METHOD(removeSubviewsFromContainerWithID:(nonnull NSNumber *)containe
|
||||
NSString *property = deleteAnimation.property;
|
||||
[deleteAnimation performAnimations:^{
|
||||
if ([property isEqualToString:@"scaleXY"]) {
|
||||
removedChild.layer.transform = CATransform3DMakeScale(0, 0, 0);
|
||||
removedChild.layer.transform = CATransform3DMakeScale(0.001, 0.001, 0.001);
|
||||
} else if ([property isEqualToString:@"opacity"]) {
|
||||
removedChild.layer.opacity = 0.0;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user