Vizzu / Modules / animcontrol / AnimControl
Class: AnimControl
animcontrol.AnimControl
Control object for animation.
Accessors
direction
• get
direction(): "reverse"
| "normal"
Getting the play direction of the animation.
Returns
"reverse"
| "normal"
• set
direction(value
): void
Setting the play direction of the animation.
Parameters
Name | Type |
---|---|
value |
"reverse" | "normal" |
Returns
void
playState
• get
playState(): "paused"
| "running"
Getting the playback state of the animation.
Returns
"paused"
| "running"
• set
playState(value
): void
Setting the playback state of the animation.
Parameters
Name | Type |
---|---|
value |
"paused" | "running" |
Returns
void
position
• get
position(): number
Getting the position of the animation.
Returns
number
• set
position(value
): void
Setting the position of the animation.
Parameters
Name | Type |
---|---|
value |
number |
Returns
void
speed
• get
speed(): number
Getting the playback speed of the animation.
Returns
number
• set
speed(value
): void
Setting the playback speed of the animation. It is 1.0 by default. Negative values are considered 0.
Parameters
Name | Type |
---|---|
value |
number |
Returns
void
Methods
cancel
▸ cancel(): AnimControl
Cancels the animation, will reject the animation promise.
Returns
pause
▸ pause(): AnimControl
Returns
Deprecated
Pauses the controlled animation.
play
▸ play(): AnimControl
Returns
Deprecated
Plays/resumes playing of the controlled animation.
reverse
▸ reverse(): AnimControl
Returns
Deprecated
Changes the direction of the controlled animation to reverse.
seek
▸ seek(value
): AnimControl
Seeks the animation to the position specified by time or progress percentage. Seeking the animation to the end position while the animation is paused will not trigger the animation complete promise to resolve.
Parameters
Name | Type |
---|---|
value |
Position |
Returns
stop
▸ stop(): AnimControl
Stops the current animation seeking it back to its start position.
Returns
store
▸ store(): CAnimation
Returns a reference to the actual animation for further reuse.
Returns