mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Fix skew transform on native side (iOS & Android)
Summary: According to #11992 fix skew transform in native code as well janicduplessis vjeux Closes https://github.com/facebook/react-native/pull/12106 Differential Revision: D4479880 fbshipit-source-id: d84780842b555f6352d84d229b5b6c5c3c6a0647
This commit is contained in:
committed by
Facebook Github Bot
parent
850c71c2f3
commit
c68195929b
@@ -118,13 +118,11 @@ static const NSUInteger kMatrixArrayLength = 4 * 4;
|
||||
|
||||
} else if ([property isEqualToString:@"skewX"]) {
|
||||
CGFloat skew = [self convertToRadians:value];
|
||||
transform.m21 = sinf(skew);
|
||||
transform.m22 = cosf(skew);
|
||||
transform.m21 = tanf(skew);
|
||||
|
||||
} else if ([property isEqualToString:@"skewY"]) {
|
||||
CGFloat skew = [self convertToRadians:value];
|
||||
transform.m11 = cosf(skew);
|
||||
transform.m12 = sinf(skew);
|
||||
transform.m12 = tanf(skew);
|
||||
|
||||
} else {
|
||||
RCTLogError(@"Unsupported transform type for a CATransform3D: %@.", property);
|
||||
|
||||
Reference in New Issue
Block a user