ionic-framework
Version:
70 lines (69 loc) • 2.29 kB
TypeScript
/**
Animation Steps/Process
-----------------------
1) Construct animation (doesn't start)
2) Client play()'s animation, returns promise
3) Add before classes to elements
4) Remove before classes from elements
5) Elements staged in "from" effect w/ inline styles
6) Call onReady()
7) Wait for RENDER_DELAY milliseconds (give browser time to render)
8) Call onPlay()
8) Run from/to animation on elements
9) Animations finish async
10) Set inline styles w/ the "to" effects on elements
11) Add after classes to elements
12) Remove after classes from elements
13) Call onFinish()
14) Resolve play()'s promise
**/
export declare class Animation {
constructor(ele: any, opts?: {});
reset(): void;
elements(ele: any): this;
addElement(ele: any): void;
parent(parentAnimation: any): this;
add(childAnimations: any): this;
duration(value: any): any;
clearDuration(): void;
easing(name: any, opts: any): any;
playbackRate(value: any): any;
reverse(): any;
forward(): any;
from(property: any, value: any): this;
to(property: any, value: any): this;
fromTo(property: any, from: any, to: any): this;
fadeIn(): this;
fadeOut(): this;
before: {
addClass: (className: any) => this;
removeClass: (className: any) => this;
setStyles: (styles: any) => this;
};
after: {
addClass: (className: any) => this;
removeClass: (className: any) => this;
};
play(done: any): any;
stage(): void;
_onPlay(): void;
_onFinish(): void;
pause(): void;
progressStart(): void;
progress(value: any): void;
/**
* Get the current time of the first animation
* in the list. To get a specific time of an animation, call
* subAnimationInstance.getCurrentTime()
*/
getCurrentTime(): any;
progressEnd(shouldComplete: any, rate?: number): Promise<any[]>;
onReady(fn: any, clear: any): this;
onPlay(fn: any, clear: any): this;
onFinish(fn: any, clear: any): this;
clone(): any;
dispose(removeElement: any): void;
static create(element: any, name: any): any;
static createTransition(enteringView: any, leavingView: any, opts?: {}): any;
static register(name: any, AnimationClass: any): void;
}