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/08/22 08:26:56 UTC

[4/9] incubator-weex git commit: * [ios] transition fix number calculate bug

* [ios] transition fix number calculate bug


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

Branch: refs/heads/0.16-dev
Commit: 5189d9cfa68cb3bc385e038d645019c00132cc53
Parents: ec1dd7b
Author: doumafang <do...@gmail.com>
Authored: Mon Aug 21 18:08:00 2017 +0800
Committer: doumafang <do...@gmail.com>
Committed: Mon Aug 21 18:08:00 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Module/WXTransition.m | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5189d9cf/ios/sdk/WeexSDK/Sources/Module/WXTransition.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Module/WXTransition.m b/ios/sdk/WeexSDK/Sources/Module/WXTransition.m
index 2c27cb4..9230a27 100644
--- a/ios/sdk/WeexSDK/Sources/Module/WXTransition.m
+++ b/ios/sdk/WeexSDK/Sources/Module/WXTransition.m
@@ -304,24 +304,24 @@
         else if ([info.propertyName hasPrefix:@"transform"])
         {
             double currentValue = [info.fromValue doubleValue] + [info.perValue doubleValue] * per;
-            NSString *transformString;
-            if ([info.propertyName isEqualToString:@"transfrom.rotation"]) {
-                transformString = [NSString stringWithFormat:@"rotate(%lfpx)",currentValue / _targetComponent.weexInstance.pixelScaleFactor];
+            NSString *transformString = [NSString string];
+            if ([info.propertyName isEqualToString:@"transform.rotation"]) {
+                transformString = [NSString stringWithFormat:@"rotate(%lfdeg)",currentValue * 180.0 / M_PI];
             }
-            if ([info.propertyName isEqualToString:@"transfrom.rotation.x"]) {
-                transformString = [NSString stringWithFormat:@"rotateX(%lfpx)",currentValue / _targetComponent.weexInstance.pixelScaleFactor];
+            if ([info.propertyName isEqualToString:@"transform.rotation.x"]) {
+                transformString = [NSString stringWithFormat:@"rotateX(%lfdeg)",currentValue * 180.0 / M_PI];
             }
             if ([info.propertyName isEqualToString:@"transform.rotation.y"]) {
-                transformString = [NSString stringWithFormat:@"rotateY(%lfpx)",currentValue / _targetComponent.weexInstance.pixelScaleFactor];
+                transformString = [NSString stringWithFormat:@"rotateY(%lfdeg)",currentValue * 180.0 / M_PI];
             }
             if ([info.propertyName isEqualToString:@"transform.rotation.z"]) {
-                transformString = [NSString stringWithFormat:@"rotateZ(%lfpx)",currentValue / _targetComponent.weexInstance.pixelScaleFactor];
+                transformString = [NSString stringWithFormat:@"rotateZ(%lfdeg)",currentValue];
             }
             if ([info.propertyName isEqualToString:@"transform.scale.x"]) {
-                transformString = [NSString stringWithFormat:@"scaleX(%lfpx)",currentValue / _targetComponent.weexInstance.pixelScaleFactor];
+                transformString = [NSString stringWithFormat:@"scaleX(%lf)",currentValue];
             }
             if ([info.propertyName isEqualToString:@"transform.scale.y"]) {
-                transformString = [NSString stringWithFormat:@"scaleY(%lfpx)",currentValue / _targetComponent.weexInstance.pixelScaleFactor];
+                transformString = [NSString stringWithFormat:@"scaleY(%lf)",currentValue];
             }
             if ([info.propertyName isEqualToString:@"transform.translation.x"]) {
                 transformString = [NSString stringWithFormat:@"translateX(%lfpx)",currentValue / _targetComponent.weexInstance.pixelScaleFactor];