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/06/07 09:14:32 UTC

incubator-weex git commit: * [doc] add 750 viewport concept

Repository: incubator-weex
Updated Branches:
  refs/heads/dev d6a90e927 -> a279c232e


* [doc] add 750 viewport concept


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

Branch: refs/heads/dev
Commit: a279c232e1c8d160ff8685b908012ad4a6eb413e
Parents: d6a90e9
Author: acton393 <zh...@gmail.com>
Authored: Wed Jun 7 17:14:27 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Wed Jun 7 17:14:27 2017 +0800

----------------------------------------------------------------------
 doc/source/cn/references/weex-variable.md | 4 ++--
 doc/source/references/weex-variable.md    | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a279c232/doc/source/cn/references/weex-variable.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/references/weex-variable.md b/doc/source/cn/references/weex-variable.md
index d0bd406..4630681 100644
--- a/doc/source/cn/references/weex-variable.md
+++ b/doc/source/cn/references/weex-variable.md
@@ -22,7 +22,7 @@ has_chapter_content: true
     * `platform: string`: 平台信息,是 iOS、Android 还是 Web。
     * `osVersion: string`: 系统版本。
     * `deviceModel: string`: 设备型号 (仅原生应用)。
-    * `deviceWidth: number`: 设备宽度,默认为 750。
+    * `deviceWidth: number`: 设备宽度。Weex 默认以宽度为 750px 做适配渲染,要获得750px下的屏幕高度,可以通过 `height = 750/deviceWidth*deviceHeight`  公式获得,可以使用到 CSS 中,用来设置全屏尺寸
     * `deviceHeight: number`: 设备高度。
 
 ## `weex.requireModule(module: string): Object`
@@ -44,4 +44,4 @@ has_chapter_content: true
 
 ## `weex.document: Document`
 
-返回当前 Weex 页面的文档对象。
\ No newline at end of file
+返回当前 Weex 页面的文档对象。

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a279c232/doc/source/references/weex-variable.md
----------------------------------------------------------------------
diff --git a/doc/source/references/weex-variable.md b/doc/source/references/weex-variable.md
index 35b4da4..b55eef5 100644
--- a/doc/source/references/weex-variable.md
+++ b/doc/source/references/weex-variable.md
@@ -21,8 +21,8 @@ This variable contains all the environment information for the current Weex page
 + `Platform: string`: platform information, that is iOS, Android or Web.
 + `OsVersion: string`: system version.
 + `DeviceModel: string`: device model (native application only).
-+ `DeviceWidth: number`: device width, default 750.
-+ `DeviceHeight: number`: device height.    
++ `DeviceWidth: number`: device width
++ `DeviceHeight: number`: device height.  In Weex, the default width of viewport is 750px, thus you can obtain the height of screen by `height = 750/deviceWidth*deviceHeight` if the width of viewport remains its default value.
 
 `weex.requireModule(module: string): Object`