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

Unified Diff: sky/framework/components/scrollable.dart

Issue 1082163002: Scrollable should use scrollTo() when starting an animation (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 8 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/components/scrollable.dart
diff --git a/sky/framework/components/scrollable.dart b/sky/framework/components/scrollable.dart
index 0bbe0e55c4eb6ae20fc64300f935a4befd7c2448..6bc7829beaad18690ae0d918f88c62104c4d405f 100644
--- a/sky/framework/components/scrollable.dart
+++ b/sky/framework/components/scrollable.dart
@@ -69,11 +69,7 @@ abstract class Scrollable extends Component {
_simulation = scrollBehavior.release(particle);
if (_simulation == null)
return;
- _simulation.onTick.listen((_) {
- setState(() {
- _scrollOffset = particle.position;
- });
- });
+ _simulation.onTick.listen((_) {scrollTo(particle.position);});
Hixie 2015/04/14 16:52:30 Keep it on three lines or use the => form.
}
Particle _createParticle([double velocity = 0.0]) {
« 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