You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ha...@apache.org on 2018/03/07 02:49:51 UTC

[1/2] incubator-weex-site git commit: [doc] add force property and add examples

Repository: incubator-weex-site
Updated Branches:
  refs/heads/master 60fc30223 -> 23d960516


[doc] add force property and add examples


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

Branch: refs/heads/master
Commit: ee306b5a180148a777e231fbb2216d5256c19315
Parents: 385adb4
Author: acton393 <zh...@gmail.com>
Authored: Tue Mar 6 21:50:57 2018 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Tue Mar 6 21:50:57 2018 +0800

----------------------------------------------------------------------
 source/cn/wiki/gestures.md | 6 +++++-
 source/wiki/gestures.md    | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/ee306b5a/source/cn/wiki/gestures.md
----------------------------------------------------------------------
diff --git a/source/cn/wiki/gestures.md b/source/cn/wiki/gestures.md
index 1d2c207..c3f551d 100644
--- a/source/cn/wiki/gestures.md
+++ b/source/cn/wiki/gestures.md
@@ -10,7 +10,7 @@ version: 2.1
 
 *注:该功能属于实验性功能*
 
-Weex 封装了原生的触摸事件以提供手势系统。使用手势类似于在 Weex 中使用事件,只需在节点上设置 `on` 特性来监听手势即可。
+Weex 封装了原生的触摸事件以提供手势系统。使用手势类似于在 Weex 中使用事件,只需在节点上监听手势即可。
 
 ## 手势类型
 
@@ -56,6 +56,10 @@ Weex 封装了原生的触摸事件以提供手势系统。使用手势类似于
 - `pageY`:触摸点相对于文档顶部边缘的 Y 轴坐标。
 - `screenX`:触摸点相对于屏幕左侧边缘的 X 轴坐标。
 - `screenY`:触摸点相对于屏幕顶部边缘的 Y 轴坐标。
+- `force`: 屏幕收到的按压力度,值的范围为 0~1
+>>> force 属性目前在支持 forceTouch iOS 设备才支持, iPhone 6s 及更新的 iOS 设备
+
+[试一试](http://dotwe.org/vue/91b6929f4f9f97a099a30c516dc2db06)
 
 ## 约束
 

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/ee306b5a/source/wiki/gestures.md
----------------------------------------------------------------------
diff --git a/source/wiki/gestures.md b/source/wiki/gestures.md
index cb3cb69..9e0f7b3 100644
--- a/source/wiki/gestures.md
+++ b/source/wiki/gestures.md
@@ -10,7 +10,7 @@ version: 2.1
 
 > Experiment Feature
 
-Weex encapsulates native touch events to provide a gesture system. Using gesture is similar to use event in Weex. Just set `on` attributes on a node to listen to gesture.
+Weex encapsulates native touch events to provide a gesture system. Using gesture is similar to use event in Weex.
 
 ## Type
 For now, there are four types of gestures:
@@ -52,6 +52,10 @@ The following properties can be used in gesture callback:
 * `pageY`. The Y coordinate of the touch pointer relative to the top of the document.
 * `screenX`. The X coordinate of the touch point relative to the left edge of the screen.
 * `screenY`. The Y coordinate of the touch point relative to the top edge of the screen.
+* `force`. A float value that represents the amount of pressure the user is applying to the touch surface. This is a value between 0.0 (no pressure) and 1.0 (the maximum amount of pressure the hardware can recognize).
+>>> iOS only and force is included in iPhone 6S and later models
+
+[have a try](http://dotwe.org/vue/91b6929f4f9f97a099a30c516dc2db06)
 
 ## Constrain
 Currently, Weex Android do not support listening to gesture on `scroller`, `list` and `webview`, as it would lead a large amount of event conflicting.


[2/2] incubator-weex-site git commit: [doc] add force property and add examples (#90)

Posted by ha...@apache.org.
[doc] add force property and add examples (#90)


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

Branch: refs/heads/master
Commit: 23d960516a184886044fdbdec31581a613faf730
Parents: 60fc302 ee306b5
Author: Hanks <zh...@gmail.com>
Authored: Wed Mar 7 10:49:24 2018 +0800
Committer: Hanks <zh...@gmail.com>
Committed: Wed Mar 7 10:49:24 2018 +0800

----------------------------------------------------------------------
 source/cn/wiki/gestures.md | 6 +++++-
 source/wiki/gestures.md    | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------