mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
Merge pull request #3954 from NativeScript/animations-reset
Fix animation's "Reset"
This commit is contained in:
@ -92,6 +92,7 @@ export class Animation extends AnimationBase {
|
||||
constructor(animationDefinitions: Array<AnimationDefinitionInternal>, playSequentially?: boolean) {
|
||||
super(animationDefinitions, playSequentially);
|
||||
|
||||
this._valueSource = "animation";
|
||||
if (animationDefinitions.length > 0 && animationDefinitions[0].valueSource !== undefined) {
|
||||
this._valueSource = animationDefinitions[0].valueSource;
|
||||
}
|
||||
@ -275,7 +276,7 @@ export class Animation extends AnimationBase {
|
||||
animator.addUpdateListener(new android.animation.ValueAnimator.AnimatorUpdateListener({
|
||||
onAnimationUpdate(animator: android.animation.ValueAnimator) {
|
||||
let argb = (<java.lang.Integer>animator.getAnimatedValue()).intValue();
|
||||
propertyAnimation.target.style[backgroundColorProperty.cssName] = new Color(argb);
|
||||
propertyAnimation.target.style[setLocal ? backgroundColorProperty.name : backgroundColorProperty.keyframe] = new Color(argb);
|
||||
}
|
||||
}));
|
||||
|
||||
|
@ -153,6 +153,7 @@ export class Animation extends AnimationBase {
|
||||
constructor(animationDefinitions: Array<AnimationDefinitionInternal>, playSequentially?: boolean) {
|
||||
super(animationDefinitions, playSequentially);
|
||||
|
||||
this._valueSource = "animation";
|
||||
if (animationDefinitions.length > 0 && animationDefinitions[0].valueSource !== undefined) {
|
||||
this._valueSource = animationDefinitions[0].valueSource;
|
||||
}
|
||||
|
@ -339,7 +339,7 @@ export class View extends ViewCommon {
|
||||
return this.nativeView.getAlpha();
|
||||
}
|
||||
[opacityProperty.setNative](value: number) {
|
||||
this.nativeView.setAlpha(value);
|
||||
this.nativeView.setAlpha(float(value));
|
||||
}
|
||||
|
||||
[horizontalAlignmentProperty.getDefault](): HorizontalAlignment {
|
||||
|
Reference in New Issue
Block a user