Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: sky/sdk/lib/animation/animation_performance.dart

Issue 1238573002: AnimatedType should hit |end| (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/painting/Offset.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/animation/animation_performance.dart
diff --git a/sky/sdk/lib/animation/animation_performance.dart b/sky/sdk/lib/animation/animation_performance.dart
index b857ee957efe4413bf11901f537ed5bfeb9f8348..7b7a96e5f70b19d7527c079bd17f747ce8990dc9 100644
--- a/sky/sdk/lib/animation/animation_performance.dart
+++ b/sky/sdk/lib/animation/animation_performance.dart
@@ -22,8 +22,12 @@ class AnimatedType<T extends dynamic> extends AnimatedVariable {
void setFraction(double t) {
if (end != null) {
- // TODO(mpcomplete): Reverse the timeline and curve.
- value = begin + (end - begin) * curve.transform(t);
+ if (t == 1.0) {
+ value = end;
+ } else {
+ // TODO(mpcomplete): Reverse the timeline and curve.
+ value = begin + (end - begin) * curve.transform(t);
+ }
}
}
« no previous file with comments | « sky/engine/core/painting/Offset.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698