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)

Stores the start time and starts the animation

Members

callbacks : Function[]

functions to be called upon completion

computedDuration : number

the duration (ms) of the animation (whether from CSS or manually set)

computedDelay : number

the animation delay (ms) (whether from CSS or manually set)

startTime : number

timestamp of when the animation started

eventClearFunctions : Function[]

functions for removing event listeners

completed : boolean

flag used to track whether or not the animation has finished

totalTime : number

total amount of time that the animation should take including delay

element : HTMLElement

Not Yet Documented

data : CssAnimationOptions

Not Yet Documented

browserDetails : BrowserDetails

Not Yet Documented

wait(callback: Function)

Not Yet Documented

setup() : void

Sets up the initial styles before the animation is started

start() : void

After the initial setup has occurred, this method adds the animation styles

applyStyles(styles: {[key: string]: any}) : void

Applies the provided styles to the element

addClasses(classes: string[]) : void

Adds the provided classes to the element

removeClasses(classes: string[]) : void

Removes the provided classes from the element

addEvents() : void

Adds events to track when animations have finished

handleAnimationEvent(event: any) : void

Not Yet Documented

handleAnimationCompleted() : void

Runs all animation callbacks and removes temporary classes

onComplete(callback: Function) : Animation

Adds animation callbacks to be called upon completion

parseDurationString(duration: string) : number

Converts the duration string to the number of milliseconds

stripLetters(str: string) : string

Strips the letters from the duration string