Fixed regression issue: rotate() doesn't reset after 360 degrees rotation

This commit is contained in:
Tsvetan Raikov
2016-09-14 15:00:04 +03:00
parent b174762a48
commit e2178fbf12

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;