mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-26 03:01:51 +08:00
Merge pull request #2308 from NativeScript/raikov/fix-2177
Fixed: iOS CSS Animation rotate() do not reset the value after 360 degrees rotation
This commit is contained in:
@ -223,7 +223,7 @@ export class Animation extends common.Animation implements definition.Animation
|
||||
let value = animation.value;
|
||||
let originalValue;
|
||||
|
||||
let tempRotate = animation.target.rotate * Math.PI / 180;
|
||||
let tempRotate = (animation.target.rotate || 0) * Math.PI / 180;
|
||||
let abs;
|
||||
|
||||
if (valueSource === undefined) {
|
||||
@ -266,12 +266,7 @@ export class Animation extends common.Animation implements definition.Animation
|
||||
animation.target.style._setValue(style.rotateProperty, value, valueSource);
|
||||
};
|
||||
propertyNameToAnimate = "transform.rotation";
|
||||
if (presentationLayer != null && valueSource !== dependencyObservable.ValueSource.Css) {
|
||||
originalValue = presentationLayer.valueForKeyPath("transform.rotation");
|
||||
}
|
||||
else {
|
||||
originalValue = nativeView.layer.valueForKeyPath("transform.rotation");
|
||||
}
|
||||
originalValue = tempRotate;
|
||||
if (originalValue === 0 && animation.target.rotate !== undefined &&
|
||||
animation.target.rotate !== 0 && Math.floor(value / 360) - value / 360 === 0) {
|
||||
originalValue = animation.target.rotate * Math.PI / 180;
|
||||
|
Reference in New Issue
Block a user