mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Added custom animation curve support and spring animations
This commit is contained in:
@@ -27,6 +27,21 @@ export interface PropertyAnimation {
|
||||
curve?: any;
|
||||
}
|
||||
|
||||
export class CustomAnimationCurve implements definition.CustomAnimationCurve {
|
||||
|
||||
public x1: number;
|
||||
public y1: number;
|
||||
public x2: number;
|
||||
public y2: number;
|
||||
|
||||
constructor(x1: number, y1: number, x2: number, y2: number) {
|
||||
this.x1 = x1;
|
||||
this.y1 = y1;
|
||||
this.x2 = x2;
|
||||
this.y2 = y2;
|
||||
}
|
||||
}
|
||||
|
||||
export class Animation implements definition.Animation {
|
||||
public _propertyAnimations: Array<PropertyAnimation>;
|
||||
public _playSequentially: boolean;
|
||||
@@ -98,7 +113,7 @@ export class Animation implements definition.Animation {
|
||||
}
|
||||
|
||||
var propertyAnimations = new Array<PropertyAnimation>();
|
||||
|
||||
|
||||
// opacity
|
||||
if (animationDefinition.opacity !== undefined) {
|
||||
propertyAnimations.push({
|
||||
|
||||
Reference in New Issue
Block a user