Skip to content

Commit 3369f32

Browse files
author
Gabriel Peal
committed
Support rotation when it is set on the Z axis
1 parent 708722c commit 3369f32

File tree

1 file changed

+3
-2
lines changed
  • lottie/src/main/java/com/airbnb/lottie/model

1 file changed

+3
-2
lines changed

lottie/src/main/java/com/airbnb/lottie/model/Layer.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,13 @@ static Layer fromJson(JSONObject json, LottieComposition composition) {
8989
if (L.DBG) Log.d(TAG, "\tOpacity=" + layer.opacity.getInitialValue());
9090
}
9191

92-
JSONObject rotation = null;
92+
JSONObject rotation;
9393
try {
9494
rotation = ks.getJSONObject("r");
9595
} catch (JSONException e) {
96-
// Do nothing.
96+
rotation = ks.getJSONObject("rz");
9797
}
98+
9899
if (rotation != null) {
99100
layer.rotation = new AnimatableFloatValue(rotation, layer.frameRate, composition, false);
100101
if (L.DBG) Log.d(TAG, "\tRotation=" + layer.rotation.getInitialValue());

0 commit comments

Comments
 (0)