export class Animation
export class Animation
exported from angular2/animate defined in angular2/src/animate/animation.ts (line 14)
Constructor
constructor(element: HTMLElement, data: CssAnimationOptions, browserDetails: BrowserDetails)
constructor(element: HTMLElement, data: CssAnimationOptions, browserDetails: BrowserDetails)
Stores the start time and starts the animation
Members
callbacks : Function[]
callbacks : Function[]
functions to be called upon completion
computedDuration : number
computedDuration : number
the duration (ms) of the animation (whether from CSS or manually set)
computedDelay : number
computedDelay : number
the animation delay (ms) (whether from CSS or manually set)
startTime : number
startTime : number
timestamp of when the animation started
eventClearFunctions : Function[]
eventClearFunctions : Function[]
functions for removing event listeners
completed : boolean
completed : boolean
flag used to track whether or not the animation has finished
totalTime : number
totalTime : number
total amount of time that the animation should take including delay
element : HTMLElement
element : HTMLElement
Not Yet Documented
data : CssAnimationOptions
data : CssAnimationOptions
Not Yet Documented
browserDetails : BrowserDetails
browserDetails : BrowserDetails
Not Yet Documented
wait(callback: Function)
wait(callback: Function)
Not Yet Documented
setup() : void
setup() : void
Sets up the initial styles before the animation is started
start() : void
start() : void
After the initial setup has occurred, this method adds the animation styles
applyStyles(styles: {[key: string]: any}) : void
applyStyles(styles: {[key: string]: any}) : void
Applies the provided styles to the element
addClasses(classes: string[]) : void
addClasses(classes: string[]) : void
Adds the provided classes to the element
removeClasses(classes: string[]) : void
removeClasses(classes: string[]) : void
Removes the provided classes from the element
addEvents() : void
addEvents() : void
Adds events to track when animations have finished
handleAnimationEvent(event: any) : void
handleAnimationEvent(event: any) : void
Not Yet Documented
handleAnimationCompleted() : void
handleAnimationCompleted() : void
Runs all animation callbacks and removes temporary classes
onComplete(callback: Function) : Animation
onComplete(callback: Function) : Animation
Adds animation callbacks to be called upon completion
parseDurationString(duration: string) : number
parseDurationString(duration: string) : number
Converts the duration string to the number of milliseconds
stripLetters(str: string) : string
stripLetters(str: string) : string
Strips the letters from the duration string