Permalink
Browse files

Fix skew transform on native side (iOS & Android)

Summary:
According to #11992 fix skew transform in native code as well

janicduplessis vjeux
Closes #12106

Differential Revision: D4479880

fbshipit-source-id: d84780842b555f6352d84d229b5b6c5c3c6a0647
  • Loading branch information...
MaxGraey authored and facebook-github-bot committed Jan 28, 2017
1 parent 850c71c commit c68195929b3d7f7cc1370e36f3e22b4cbd2d2707
@@ -118,13 +118,11 @@ + (CATransform3D)CATransform3D:(id)json
} 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);
@@ -426,13 +426,11 @@ public static void applyTranslate3D(double[] m, double x, double y, double z) {
}
public static void applySkewX(double[] m, double radians) {
m[4] = Math.sin(radians);
m[5] = Math.cos(radians);
m[4] = Math.tan(radians);
}
public static void applySkewY(double[] m, double radians) {
m[0] = Math.cos(radians);
m[1] = Math.sin(radians);
m[1] = Math.tan(radians);
}
public static void applyRotateX(double[] m, double radians) {

0 comments on commit c681959

Please sign in to comment.