* [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/master Commit: 23cc3eaf1f26f65816b66d6cd2f49c3568da5b5f Parents: eeaa5e0 Author: doumafang <doumaf...@gmail.com> Authored: Fri Sep 22 14:12:14 2017 +0800 Committer: doumafang <doumaf...@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.' })