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

Unified Diff: sky/sdk/lib/widgets/drawer.dart

Issue 1220973005: Fix regressions with Drawer animations that I introduced. (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/widgets/drawer.dart
diff --git a/sky/sdk/lib/widgets/drawer.dart b/sky/sdk/lib/widgets/drawer.dart
index 8ff37b6daf4ef2cf053a7aedcff04d6d58846d5c..ca4f9de1416844fdcffb3336f96cfabfc04bf20a 100644
--- a/sky/sdk/lib/widgets/drawer.dart
+++ b/sky/sdk/lib/widgets/drawer.dart
@@ -27,7 +27,10 @@ import 'theme.dart';
const double _kWidth = 304.0;
const double _kMinFlingVelocity = 0.4;
const int _kBaseSettleDurationMS = 246;
-const Curve _kAnimationCurve = parabolicRise;
+// TODO(mpcomplete): The curve must be linear if we want the drawer to track
+// the user's finger. Odeon remedies this by attaching spring forces to the
+// initial timeline when animating (so it doesn't look linear).
+const Curve _kAnimationCurve = linear;
typedef void DrawerStatusChangeHandler (bool showing);
@@ -117,7 +120,7 @@ class Drawer extends AnimatedComponent {
// like fades, slides, rotates, pinch, etc.
Widget build() {
// TODO(mpcomplete): animate as a fade-in.
- double scaler = controller.performance.progress + 1.0;
+ double scaler = controller.performance.progress;
Color maskColor = new Color.fromARGB((0x7F * scaler).floor(), 0, 0, 0);
var mask = new Listener(
« 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