C

Animator

Inheritance Hierarchy

Remarks

For running IAnimation instances the method animate can be used. For simpler cases of custom animations there are also overloads that take an animation callback.

See Also

Developer's Guide

API

IAnimation

Members

Show:

Constructors

Initializes a new instance of the Animator class for the given CanvasComponent.
Using this constructor, this instance will query an instance of WaitInputMode from the canvas's context to automatically set the waiting property during animations if allowUserInteraction is set to false. The animation is not started until animate or animate is called.

Parameters

canvasComponent: CanvasComponent
The canvas component.

Properties

Gets or sets whether user interaction should be allowed during the animation.
If false, the WaitInputMode is queried from the CanvasComponent and waiting is enabled during the animation. The default is false.
final
Gets or sets a value indicating whether to automatically invalidate the control this instance has been created for.
The default is true.
final

Property Value

true if invalidation should happen automatically; false otherwise.
Gets the control the animations are run on.
readonlyfinal
Gets or sets a value indicating whether the animator should pause or resume.
Adding an animation in a suspended animator does not start the animation unless Pause is set to true.
final

Methods

Animates the given animation.
final

Parameters

animation: IAnimation
The animation to perform.

Return Value

Promise<void>
A Promise<void> that will resolve once the animation is finished.
Starts animating the given animation for the specified duration.
final

Parameters

callback: function(number): void
The callback to use for the animation.
duration: TimeSpan
The duration that the animation should last.

Return Value

Promise<void>
A Promise<void> that will resolve once the animation has finished.
Invalidates the control if autoInvalidation is set to true.
This implementation calls invalidate.
protected

Parameters

canvasComponent: CanvasComponent
The component.
Stops all running animations.