You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ac...@apache.org on 2017/07/12 08:33:44 UTC

[1/4] incubator-weex git commit: * [ios] fix bug about rotate

Repository: incubator-weex
Updated Branches:
  refs/heads/0.15-dev 7d1602bcb -> 904b292bf


* [ios] fix bug about rotate


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/46b54380
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/46b54380
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/46b54380

Branch: refs/heads/0.15-dev
Commit: 46b543803bf714e9fb1e35daef7ecc97452af25b
Parents: 7f247fc
Author: acton393 <zh...@gmail.com>
Authored: Tue Jul 11 03:17:34 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Tue Jul 11 03:17:34 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Component/WXTransform.m | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/46b54380/ios/sdk/WeexSDK/Sources/Component/WXTransform.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXTransform.m b/ios/sdk/WeexSDK/Sources/Component/WXTransform.m
index 3382936..f9b26bc 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXTransform.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXTransform.m
@@ -149,16 +149,16 @@
     }
     CATransform3D nativeTransform3d = [self nativeTransformWithoutRotateWithView:view];
     
-    if (_rotateAngle != 0 || _rotateX != 0) {
-        CATransform3D rotateXTransform = CATransform3DMakeRotation(_rotateAngle?:_rotateX, 1, 0, 0);
+    if (_rotateAngle != 0 || _rotateZ != 0) {
+        CATransform3D rotateXTransform = CATransform3DMakeRotation(_rotateAngle?:_rotateZ, 0, 0, 1);
         nativeTransform3d = CATransform3DConcat(nativeTransform3d, rotateXTransform);
     }
     if (_rotateY != 0) {
         CATransform3D rotateYTransform = CATransform3DMakeRotation(_rotateY, 0, 1, 0);
         nativeTransform3d = CATransform3DConcat(nativeTransform3d, rotateYTransform);
     }
-    if (_rotateZ != 0) {
-        CATransform3D rotateZTransform = CATransform3DMakeRotation(_rotateZ, 0, 0, 1);
+    if (_rotateX != 0) {
+        CATransform3D rotateZTransform = CATransform3DMakeRotation(_rotateX, 1, 0, 0);
         nativeTransform3d = CATransform3DConcat(nativeTransform3d, rotateZTransform);
     }
     


[3/4] incubator-weex git commit: Merge branch '0.15-dev' of https://git-wip-us.apache.org/repos/asf/incubator-weex into 0.15-dev

Posted by ac...@apache.org.
Merge branch '0.15-dev' of https://git-wip-us.apache.org/repos/asf/incubator-weex into 0.15-dev


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/20c70296
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/20c70296
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/20c70296

Branch: refs/heads/0.15-dev
Commit: 20c70296dcc3745107c08f76a520607370af6b51
Parents: 18a1576 7d1602b
Author: acton393 <zh...@gmail.com>
Authored: Wed Jul 12 10:57:34 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Wed Jul 12 10:57:34 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------



[2/4] incubator-weex git commit: * [ios] add rotateX and rotateY unit test case

Posted by ac...@apache.org.
* [ios] add rotateX and rotateY unit test case


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/18a1576f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/18a1576f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/18a1576f

Branch: refs/heads/0.15-dev
Commit: 18a1576fb716c8e811536a33b4e328116c027122
Parents: 46b5438
Author: acton393 <zh...@gmail.com>
Authored: Tue Jul 11 03:18:19 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Tue Jul 11 03:18:19 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDKTests/WXAnimationModuleTests.m | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/18a1576f/ios/sdk/WeexSDKTests/WXAnimationModuleTests.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDKTests/WXAnimationModuleTests.m b/ios/sdk/WeexSDKTests/WXAnimationModuleTests.m
index b0bc67b..d2af216 100644
--- a/ios/sdk/WeexSDKTests/WXAnimationModuleTests.m
+++ b/ios/sdk/WeexSDKTests/WXAnimationModuleTests.m
@@ -55,6 +55,35 @@
     XCTAssert(WXTransform3DApproximateToTransform(component.layer.transform, transformToVerify));
 }
 
+- (void)testAnimationRotateZ {
+    WXComponent *component = [self component];
+    WXAnimationModule *object = [[WXAnimationModule alloc]init];
+    [object animation:component args:@{@"duration":@500, @"timingFunction":@"ease-in-out", @"styles":@{@"transform":@"rotateZ(90deg)"}} callback:nil];
+    [TestSupportUtils waitSecs:1];
+    
+    CATransform3D transformToVerify = CATransform3DMakeRotation(M_PI/2, 0, 0, 1);
+    XCTAssert(WXTransform3DApproximateToTransform(component.layer.transform, transformToVerify));
+}
+
+- (void)testAnimationRotateY {
+    WXComponent *component = [self component];
+    WXAnimationModule *object = [[WXAnimationModule alloc]init];
+    [object animation:component args:@{@"duration":@500, @"timingFunction":@"ease-in-out", @"styles":@{@"transform":@"rotateY(90deg)"}} callback:nil];
+    [TestSupportUtils waitSecs:1];
+    
+    CATransform3D transformToVerify = CATransform3DMakeRotation(M_PI/2, 0, 1, 0);
+    XCTAssert(WXTransform3DApproximateToTransform(component.layer.transform, transformToVerify));
+}
+- (void)testAnimationRotateX {
+    WXComponent *component = [self component];
+    WXAnimationModule *object = [[WXAnimationModule alloc]init];
+    [object animation:component args:@{@"duration":@500, @"timingFunction":@"ease-in-out", @"styles":@{@"transform":@"rotateX(90deg)"}} callback:nil];
+    [TestSupportUtils waitSecs:1];
+    
+    CATransform3D transformToVerify = CATransform3DMakeRotation(M_PI/2, 1, 0, 0);
+    XCTAssert(WXTransform3DApproximateToTransform(component.layer.transform, transformToVerify));
+}
+
 - (void)testAnimationTranslate {
     WXComponent *component = [self component];
     WXAnimationModule *object = [[WXAnimationModule alloc]init];


[4/4] incubator-weex git commit: * [ios] fix roatation @notdanger

Posted by ac...@apache.org.
* [ios] fix roatation @notdanger


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/904b292b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/904b292b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/904b292b

Branch: refs/heads/0.15-dev
Commit: 904b292bf7f0f73a192b9e37f1fcbd40d3075539
Parents: 20c7029
Author: acton393 <zh...@gmail.com>
Authored: Wed Jul 12 15:54:41 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Wed Jul 12 15:54:41 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Component/WXTransform.m | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/904b292b/ios/sdk/WeexSDK/Sources/Component/WXTransform.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXTransform.m b/ios/sdk/WeexSDK/Sources/Component/WXTransform.m
index f9b26bc..b6287e7 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXTransform.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXTransform.m
@@ -149,16 +149,16 @@
     }
     CATransform3D nativeTransform3d = [self nativeTransformWithoutRotateWithView:view];
     
-    if (_rotateAngle != 0 || _rotateZ != 0) {
-        CATransform3D rotateXTransform = CATransform3DMakeRotation(_rotateAngle?:_rotateZ, 0, 0, 1);
+    if (_rotateX != 0) {
+        CATransform3D rotateXTransform = CATransform3DMakeRotation(_rotateX, 1, 0, 0);
         nativeTransform3d = CATransform3DConcat(nativeTransform3d, rotateXTransform);
     }
     if (_rotateY != 0) {
         CATransform3D rotateYTransform = CATransform3DMakeRotation(_rotateY, 0, 1, 0);
         nativeTransform3d = CATransform3DConcat(nativeTransform3d, rotateYTransform);
     }
-    if (_rotateX != 0) {
-        CATransform3D rotateZTransform = CATransform3DMakeRotation(_rotateX, 1, 0, 0);
+    if (_rotateAngle != 0 || _rotateZ != 0) {
+        CATransform3D rotateZTransform = CATransform3DMakeRotation(_rotateAngle?:_rotateZ, 0, 0, 1);
         nativeTransform3d = CATransform3DConcat(nativeTransform3d, rotateZTransform);
     }