This adds the ability to Cancel the Animation via the Promise returned via a play command.

This commit is contained in:
Nathanael Anderson
2016-03-21 22:52:55 -06:00
parent 25852e9bc6
commit ccdc394be4
7 changed files with 104 additions and 13 deletions

View File

@@ -1164,7 +1164,7 @@ export class View extends ProxyObject implements definition.View {
}
}
public animate(animation: any): Promise<void> {
public animate(animation: any): animModule.AnimationPromise {
return this.createAnimation(animation).play();
}

2
ui/core/view.d.ts vendored
View File

@@ -518,7 +518,7 @@ declare module "ui/core/view" {
/**
* Animates one or more properties of the view based on the supplied options.
*/
public animate(options: animation.AnimationDefinition): Promise<void>;
public animate(options: animation.AnimationDefinition): animation.AnimationPromise;
/**
* Creates an Animation object based on the supplied options.