You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by gu...@apache.org on 2017/09/22 06:49:51 UTC

incubator-weex git commit: * [doc] add message about animation callback

Repository: incubator-weex
Updated Branches:
  refs/heads/dev eeaa5e0bd -> 23cc3eaf1


* [doc] add message about animation callback


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

Branch: refs/heads/dev
Commit: 23cc3eaf1f26f65816b66d6cd2f49c3568da5b5f
Parents: eeaa5e0
Author: doumafang <do...@gmail.com>
Authored: Fri Sep 22 14:12:14 2017 +0800
Committer: doumafang <do...@gmail.com>
Committed: Fri Sep 22 14:12:14 2017 +0800

----------------------------------------------------------------------
 doc/source/cn/references/modules/animation.md | 5 +++--
 doc/source/references/modules/animation.md    | 6 +++---
 2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/23cc3eaf/doc/source/cn/references/modules/animation.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/references/modules/animation.md b/doc/source/cn/references/modules/animation.md
index 8d188fc..c4381f1 100644
--- a/doc/source/cn/references/modules/animation.md
+++ b/doc/source/cn/references/modules/animation.md
@@ -19,6 +19,7 @@ version: 2.1
 * `options {Object}`:描述动画过程的对象。
   * `options.duration {number}`:指定动画的持续时间 (单位是毫秒),默认值是 `0`,表示没有动画效果。
   * `options.delay {number}`:指定请求动画操作到执行动画之间的时间间隔 (单位是毫秒),默认值是 `0`,表示没有延迟,在请求后立即执行动画。
+  * `options.needLayout {boolean}`:节点动画执行时是否产生布局动画即LayoutAnimation,默认值是false。
   * `options.timingFunction {string}`:描述动画执行的速度曲线,用于使动画变化更为平滑。默认值是 `linear`,表示动画从开始到结束都拥有同样的速度。下表列出了所有合法的属性:
 
 | 属性名                            | 描述                                       |
@@ -50,8 +51,7 @@ version: 2.1
 | `rotate`/`rotateX` <span class="api-version">v0.14+</span> /`rotateY` <span class="api-version">v0.14+</span> | 指定元素将被旋转的角度,单位是度 | number | 无 |
 | `perspective` <span class="api-version">v0.16+</span> | 观察者距离z=0平面的距离,在Android 4.1及以上有效 | number | 正无穷
 
-* `callback {Function}`:动画执行完毕之后的回调
-* `needLayout(boolean)`:节点动画执行时是否产生布局动画即LayoutAnimation
+* `callback {Function}`:动画执行完毕之后的回调函数。**注意,在0.16.0+版本后,iOS上可以获取animation是否执行成功的信息,callback中的`result`参数会有两种,分别是是`Success`与`Fail`,Android暂不支持。**
 
 ## Example
 
@@ -78,6 +78,7 @@ version: 2.1
           },
           duration: 800, //ms
           timingFunction: 'ease',
+          needLayout:false,
           delay: 0 //ms
         }, function () {
           modal.toast({ message: 'animation finished.' })

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/23cc3eaf/doc/source/references/modules/animation.md
----------------------------------------------------------------------
diff --git a/doc/source/references/modules/animation.md b/doc/source/references/modules/animation.md
index a2f5175..870afb1 100644
--- a/doc/source/references/modules/animation.md
+++ b/doc/source/references/modules/animation.md
@@ -26,6 +26,7 @@ Smooth and meaningful animation is very effective for enhancing the user experie
 **position:** Transition options.    
 - `duration` (number): Specifies the number of milliseconds of animation execution, the default value is `0`, means that no animation will occur.    
 - `delay` (number): Specifies the amount of milliseconds to wait between a change being requested to a property that is to be transitioned and the start of the transition effect. The default value is `0`.   
+-  `needLayout`(boolean):Whether or not the layout animation occurs when animation is executed,default value is `false`
 - `timingFunction` (string): Used to describe how the intermediate values of the styles being affected by a transition effect are calculated, default value is `linear`, the allowed attributes are listed in the following table:    
 
 | name                           | description                              |
@@ -56,11 +57,9 @@ properties of `transform`:
 | perspective <span class="api-version">v0.16+</span> | The distance between the z=0 plane and the user in order to give to the 3D-positioned element some perspective. Supported for Android 4.1 and above. | number | positive infinity
 | scale/scaleX/scaleY             | Stretch or shrink the element.           | number           | none          |
 
--  `callback`(function): Callback which is called after the completion of transition.
+-  `callback`(function): Callback which is called after the completion of transition.**NOTISE, after WeexSDK0.16.0, in iOS platform can get animation's message about completion, there are two types of parameters with `result`, is `Success`and `Fail`, Android can not support until now.**
 
 
--  `needLayout`(boolean):Whether or not the layout animation occurs when animation is executed 
-
 ### Example
 
 ```html
@@ -86,6 +85,7 @@ properties of `transform`:
           },
           duration: 800, //ms
           timingFunction: 'ease',
+          needLayout:false,
           delay: 0 //ms
         }, function () {
           modal.toast({ message: 'animation finished.' })