weex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mos...@apache.org
Subject [incubator-weex] branch master updated: Support "wx" in Transform.translate
Date Thu, 01 Aug 2019 03:00:37 GMT
This is an automated email from the ASF dual-hosted git repository.

moshen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git


The following commit(s) were added to refs/heads/master by this push:
     new ca289f4  Support "wx" in  Transform.translate
     new b943ea4  Merge pull request #2765 from Txink/Fix-Transform
ca289f4 is described below

commit ca289f46e5569dca4e99a0b83f3440e812e445c6
Author: tianpeng.xtp <tianpeng.xtp@alibaba-inc.com>
AuthorDate: Tue Jul 30 18:47:39 2019 +0800

    Support "wx" in  Transform.translate
---
 ios/sdk/WeexSDK/Sources/Component/WXTransform.m | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ios/sdk/WeexSDK/Sources/Component/WXTransform.m b/ios/sdk/WeexSDK/Sources/Component/WXTransform.m
index 1fe6566..c34e7b7 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXTransform.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXTransform.m
@@ -369,7 +369,7 @@
     if ([value[0] hasSuffix:@"%"]) {
         translateX = [WXLength lengthWithFloat:x type:WXLengthTypePercent];
     } else {
-        x = WXPixelScale(x, self.weexInstance.pixelScaleFactor);
+        x = [WXConvert WXPixelType:value[0] scaleFactor:self.weexInstance.pixelScaleFactor];
         translateX = [WXLength lengthWithFloat:x type:WXLengthTypeFixed];
     }
     _translateX = translateX;
@@ -382,7 +382,7 @@
     if ([value[0] hasSuffix:@"%"]) {
         translateY = [WXLength lengthWithFloat:y type:WXLengthTypePercent];
     } else {
-        y = WXPixelScale(y, self.weexInstance.pixelScaleFactor);
+        y = [WXConvert WXPixelType:value[0] scaleFactor:self.weexInstance.pixelScaleFactor];
         translateY = [WXLength lengthWithFloat:y type:WXLengthTypeFixed];
     }
     _translateY = translateY;


Mime
View raw message