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(): this

Cancels the animation, will reject the animation promise.

Returns

this


pause

▸ pause(): this

Returns

this

Deprecated

Pauses the controlled animation.


play

▸ play(): this

Returns

this

Deprecated

Plays/resumes playing of the controlled animation.


reverse

▸ reverse(): this

Returns

this

Deprecated

Changes the direction of the controlled animation to reverse.


seek

▸ seek(value): this

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

this


stop

▸ stop(): this

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

Returns

this


store

▸ store(): CAnimation

Returns a reference to the actual animation for further reuse.

Returns

CAnimation