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

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

Issue 1241733002: Correct bottom overscroll in VariableHeightScrollable (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Merge 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 | sky/sdk/lib/widgets/scrollable.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/animation/scroll_behavior.dart
diff --git a/sky/sdk/lib/animation/scroll_behavior.dart b/sky/sdk/lib/animation/scroll_behavior.dart
index b69c05db0ab90dd462a376e8d36ce70ab84cd2ad..b01713c888d05e6106f2e2141124280518ede622 100644
--- a/sky/sdk/lib/animation/scroll_behavior.dart
+++ b/sky/sdk/lib/animation/scroll_behavior.dart
@@ -49,8 +49,8 @@ class BoundedBehavior extends ScrollBehavior {
Simulation createDefaultScrollSimulation(double position, double velocity, double minScrollOffset, double maxScrollOffset) {
double velocityPerSecond = velocity * _kSecondsPerMillisecond;
SpringDescription spring = new SpringDescription.withDampingRatio(
- mass: 1.0, springConstant: 85.0, ratio: 1.1);
- double drag = 0.4;
+ mass: 1.0, springConstant: 170.0, ratio: 1.1);
+ double drag = 0.025;
return new ScrollSimulation(position, velocityPerSecond, minScrollOffset, maxScrollOffset, spring, drag);
}
@@ -76,7 +76,7 @@ class OverscrollBehavior extends BoundedBehavior {
// If we're overscrolling, we want move the scroll offset 2x
// slower than we would otherwise. Therefore, we "rewind" the
// newScrollOffset by half the amount that we moved it above.
- // Notice that we clap the "old" value to 0.0 so that we only
+ // Notice that we clamp the "old" value to 0.0 so that we only
// reduce the portion of scrollDelta that's applied beyond 0.0. We
// do similar things for overscroll in the other direction.
if (newScrollOffset < 0.0) {
« no previous file with comments | « no previous file | sky/sdk/lib/widgets/scrollable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698