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

Unified Diff: sky/framework/animation/generator.dart

Issue 983893002: Sometimes the drawer doesn't fully close (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/animation/generator.dart
diff --git a/sky/framework/animation/generator.dart b/sky/framework/animation/generator.dart
index 0b5055050a98bcf8d1ddf73bfd5381dafe0cb2e7..98acf607f64594a347f3c75d2181c17d5c5429ba 100644
--- a/sky/framework/animation/generator.dart
+++ b/sky/framework/animation/generator.dart
@@ -73,7 +73,13 @@ class AnimationGenerator extends FrameGenerator {
return math.min((timeStamp - startTime) / duration, 1.0);
})
.takeWhile(_checkForCompletion)
- .map((t) => begin + (end - begin) * curve.transform(t));
+ .map(_transform);
+ }
+
+ double _transform(double t) {
+ if (_done)
+ return end;
+ return begin + (end - begin) * curve.transform(t);
}
bool _checkForCompletion(double t) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698