mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
This adds the ability to Cancel the Animation via the Promise returned via a play command.
This commit is contained in:
@@ -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
2
ui/core/view.d.ts
vendored
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user