提交 c0ff1346 编写于 作者: E ester.zhou

update js-apis-animator.md

Signed-off-by: Nester.zhou <ester.zhou@huawei.com>
上级 093e2233
# Animator # Animator
> **NOTE**<br> > **NOTE**
>
> The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version. > The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
...@@ -22,7 +23,7 @@ Creates an **Animator** object. ...@@ -22,7 +23,7 @@ Creates an **Animator** object.
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| options | [AnimatorOptions](#animatoroptions) | Yes| Animator options. For details, see **AnimatorOptions**.| | options | [AnimatorOptions](#animatoroptions) | Yes| Animator options.|
**Return value** **Return value**
| Type| Description| | Type| Description|
...@@ -213,6 +214,8 @@ animator.oncancel(); ...@@ -213,6 +214,8 @@ animator.oncancel();
onrepeat: () => void onrepeat: () => void
Called when this animation repeats.
**System capability**: SystemCapability.ArkUI.ArkUI.Full **System capability**: SystemCapability.ArkUI.ArkUI.Full
**Example** **Example**
...@@ -220,8 +223,6 @@ onrepeat: () => void ...@@ -220,8 +223,6 @@ onrepeat: () => void
animator.onrepeat(); animator.onrepeat();
``` ```
Called when this animation repeats.
## AnimatorOptions ## AnimatorOptions
Defines animator options. Defines animator options.
...@@ -231,7 +232,7 @@ Defines animator options. ...@@ -231,7 +232,7 @@ Defines animator options.
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| duration | number | Yes| Duration for playing the animation, in milliseconds. The default value is **0**.| | duration | number | Yes| Duration for playing the animation, in milliseconds. The default value is **0**.|
| easing | string | Yes| Animation interpolation curve. The default value is **ease**.| | easing | string | Yes| Animation interpolation curve. The default value is **'ease'**.|
| delay | number | Yes| Animation delay duration, in milliseconds. The default value is **0**, indicating that there is no delay.| | delay | number | Yes| Animation delay duration, in milliseconds. The default value is **0**, indicating that there is no delay.|
| fill | "none" \| "forwards" \| "backwards" \| "both" | Yes| State of the animated target after the animation is executed. The default value is **none**, which means that the target will retain its end state (defined by the last keyframe) after the animation is executed. | | fill | "none" \| "forwards" \| "backwards" \| "both" | Yes| State of the animated target after the animation is executed. The default value is **none**, which means that the target will retain its end state (defined by the last keyframe) after the animation is executed. |
| direction | "normal" \| "reverse" \| "alternate" \| "alternate-reverse" | Yes| Animation playback mode. The default value is **normal**.| | direction | "normal" \| "reverse" \| "alternate" \| "alternate-reverse" | Yes| Animation playback mode. The default value is **normal**.|
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册