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 <zhangxing610...@gmail.com> Authored: Tue Mar 6 21:50:57 2018 +0800 Committer: acton393 <zhangxing610...@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.