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/11/23 13:00:27 UTC
[2/3] incubator-weex git commit: * [ios] fix parse translateY
* [ios] fix parse translateY
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/34b76b9a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/34b76b9a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/34b76b9a
Branch: refs/heads/master
Commit: 34b76b9a8a833e434ff1bc6c8603a375f46176db
Parents: 0699264
Author: doumafang <do...@gmail.com>
Authored: Fri Nov 17 14:56:30 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Thu Nov 23 20:59:29 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Component/WXTransform.m | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/34b76b9a/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 a73d92d..9f79c0e 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXTransform.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXTransform.m
@@ -312,7 +312,6 @@
}
}
}
-
_originX = [WXLength lengthWithFloat:originX type:typeX];
_originY = [WXLength lengthWithFloat:originY type:typeY];
}
@@ -368,14 +367,12 @@
- (void)parseTranslatey:(NSArray *)value
{
WXLength *translateY;
- if (value.count > 1) {
- double y = [value[0] doubleValue];
- if ([value[0] hasSuffix:@"%"]) {
- translateY = [WXLength lengthWithFloat:y type:WXLengthTypePercent];
- } else {
- y = WXPixelScale(y, self.weexInstance.pixelScaleFactor);
- translateY = [WXLength lengthWithFloat:y type:WXLengthTypeFixed];
- }
+ double y = [value[0] doubleValue];
+ if ([value[0] hasSuffix:@"%"]) {
+ translateY = [WXLength lengthWithFloat:y type:WXLengthTypePercent];
+ } else {
+ y = WXPixelScale(y, self.weexInstance.pixelScaleFactor);
+ translateY = [WXLength lengthWithFloat:y type:WXLengthTypeFixed];
}
_translateY = translateY;
}