You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by cx...@apache.org on 2017/03/02 03:28:43 UTC

[09/25] incubator-weex git commit: * [ios] when viewport is device-width, the width to be adapted should not multiply by scale

* [ios] when viewport is device-width,  the width to be adapted  should not multiply by scale


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

Branch: refs/heads/0.11-dev-recycler
Commit: 027757128684d15b6742284dbe42f8bae200a237
Parents: 1c96da7
Author: \u9690\u98ce <cx...@gmail.com>
Authored: Thu Feb 23 16:24:23 2017 +0800
Committer: \u9690\u98ce <cx...@gmail.com>
Committed: Thu Feb 23 16:24:23 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Module/WXMetaModule.m | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/02775712/ios/sdk/WeexSDK/Sources/Module/WXMetaModule.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Module/WXMetaModule.m b/ios/sdk/WeexSDK/Sources/Module/WXMetaModule.m
index 3fa4f66..af8c2d0 100644
--- a/ios/sdk/WeexSDK/Sources/Module/WXMetaModule.m
+++ b/ios/sdk/WeexSDK/Sources/Module/WXMetaModule.m
@@ -22,9 +22,9 @@ WX_EXPORT_METHOD(@selector(setViewport:))
     id viewportWidth = viewportArguments[@"width"];
     if ([viewportWidth isKindOfClass:[NSString class]]) {
         if ([viewportWidth isEqualToString:@"device-width"]) {
-            viewportWidthFloat = [WXUtility portraitScreenSize].width * WXScreenScale();
+            viewportWidthFloat = [WXUtility portraitScreenSize].width;
         } else if ([viewportWidth isEqualToString:@"device-height"]) {
-            viewportWidthFloat = [WXUtility portraitScreenSize].height * WXScreenScale();
+            viewportWidthFloat = [WXUtility portraitScreenSize].height;
         } else {
             viewportWidthFloat = [WXConvert CGFloat:viewportWidth];
         }