Skip to content

Commit

Permalink
Display last animated text value (#1689)
Browse files Browse the repository at this point in the history
When using animated text, the last value was not shown. Issue can be reproduce with this json: https://assets7.lottiefiles.com/packages/lf20_fteywrno.json

Co-authored-by: Frantisek Nagy <frantisek.nagy@erstegroup.com>
  • Loading branch information
ghus-raba and frantisek-nagy authored Nov 27, 2020
1 parent 6259afb commit 6ac86a7
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ public TextKeyframeAnimation(List<Keyframe<DocumentData>> keyframes) {
}

@Override DocumentData getValue(Keyframe<DocumentData> keyframe, float keyframeProgress) {
return keyframe.startValue;
if (keyframeProgress != 1.0f || keyframe.endValue == null)
return keyframe.startValue;
else
return keyframe.endValue;
}
}

0 comments on commit 6ac86a7

Please sign in to comment.