A generic animation class that fires callbacks into its handlers object at various states.
A generic animation class that fires callbacks into its handlers
object at various states. Nearly all dojo animation functions
return an instance of this method, usually without calling the
.play() method beforehand. Therefore, you will likely need to
call .play() on instances of Animation
when one is
returned.
Parameter | Type | Description |
---|---|---|
args | Object | The 'magic argument', mixing all the properties into this animation instance. |
See the dojox/fx/ext-dojo/reverse reference documentation for more information.
Synthetic event fired before a Animation begins playing (synchronous)
A two element array of start and end values, or a _Line
instance to be
used in the Animation.
The time in milliseconds to wait before starting animation after it has been .play()'ed
A Function to adjust the acceleration (or deceleration) of the progress across a _Line
the time in milliseconds to wait before advancing to next frame (used as a fps timer: 1000/rate = fps)
Convenience function. Fire event "evt" and pass it the arguments specified in "args".
Convenience function. Fire event "evt" and pass it the arguments specified in "args". Fires the callback in the scope of this Animation instance.
Parameter | Type | Description |
---|---|---|
evt | Event | The event to fire. |
args | Array |
Optional The arguments to pass to the event. |
Convenience function. Fire event "evt" and pass it the arguments specified in "args".
Sets the progress of the animation.
Parameter | Type | Description |
---|---|---|
percent | Decimal | A percentage in decimal notation (between and including 0.0 and 1.0). |
andPlay | Boolean |
Optional If true, play the animation after setting the progress. |
Sets the progress of the animation.
Start the animation.
Parameter | Type | Description |
---|---|---|
delay | int |
Optional How many milliseconds to delay before starting. |
gotoStart | Boolean |
Optional If true, starts the animation from the beginning; otherwise, starts it from its current position. |
The instance to allow chaining.
The key method added to an animation to enable reversal.
Parameter | Type | Description |
---|---|---|
keepPaused | Boolean | By default, calling reverse() will play the animation if it was paused. Pass in true to keep it paused (will have no effect if reverse is called while animation is playing). |
reverseEase | Function |
Optional A function to use for the reverse easing. This allows for the possibility of custom eases that are not in the dojo.fx library. |
The key method added to an animation to enable reversal.
Returns a string token representation of the status of the animation, one of: "paused", "playing", "stopped"
Stops a running animation.
Parameter | Type | Description |
---|---|---|
gotoEnd | boolean |
Optional If true, the animation will end. |
Stops a running animation.