Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #2765 from Txink/Fix-Transform
Browse files Browse the repository at this point in the history
Support "wx" in  Transform.translate
  • Loading branch information
wqyfavor committed Aug 1, 2019
2 parents 75d1004 + ca289f4 commit b943ea4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ios/sdk/WeexSDK/Sources/Component/WXTransform.m
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ - (void)parseTranslatex:(NSArray *)value
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;
Expand All @@ -382,7 +382,7 @@ - (void)parseTranslatey:(NSArray *)value
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;
Expand Down

0 comments on commit b943ea4

Please sign in to comment.