Created
March 23, 2016 13:32
-
-
Save estan/f2999d7d79c260c86f76 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
transitions: [ | |
Transition { | |
RotationAnimation { | |
// Animate all rotation changes. | |
duration: 1000 | |
easing.type: Easing.InOutQuad | |
direction: { | |
// Take the shortest direction. | |
if (from < to) | |
if (Math.abs(from - to) < 180) | |
return RotationAnimation.Counterclockwise | |
else | |
return RotationAnimation.Clockwise | |
else | |
if (Math.abs(from - to) < 180) | |
return RotationAnimation.Clockwise | |
else | |
return RotationAnimation.Counterclockwise | |
} | |
... | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment