Merge pull request #2718 from NativeScript/raikov/fix-2177

Fixed regression issue: rotate() doesn't reset after 360 degrees rotation
This commit is contained in:
dtopuzov
2016-09-16 15:42:51 +03:00
committed by GitHub

View File

@ -262,8 +262,7 @@ export class Animation extends common.Animation implements definition.Animation
};
propertyNameToAnimate = "transform.rotation";
originalValue = nativeView.layer.valueForKeyPath("transform.rotation");
if (originalValue === 0 && animation.target.rotate !== undefined &&
animation.target.rotate !== 0 && Math.floor(value / 360) - value / 360 === 0) {
if (animation.target.rotate !== undefined && animation.target.rotate !== 0 && Math.floor(value / 360) - value / 360 === 0) {
originalValue = animation.target.rotate * Math.PI / 180;
}
value = value * Math.PI / 180;