Skip to content

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

AnimControl


pause

▸ pause(): AnimControl

Returns

AnimControl

Deprecated

Pauses the controlled animation.


play

▸ play(): AnimControl

Returns

AnimControl

Deprecated

Plays/resumes playing of the controlled animation.


reverse

▸ reverse(): AnimControl

Returns

AnimControl

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

AnimControl


stop

▸ stop(): AnimControl

Stops the current animation seeking it back to its start position.

Returns

AnimControl


store

▸ store(): CAnimation

Returns a reference to the actual animation for further reuse.

Returns

CAnimation