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

Side by Side Diff: sky/sdk/lib/framework/components2/scrollable.dart

Issue 1153223003: [Effen] Point the stocks2 and components2 files at the forked libraries. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import '../animation/generators.dart'; 5 import '../animation/generators.dart';
6 import '../animation/mechanics.dart'; 6 import '../animation/mechanics.dart';
7 import '../animation/scroll_behavior.dart'; 7 import '../animation/scroll_behavior.dart';
8 import '../fn.dart'; 8 import '../fn2.dart';
9 import '../theme/view_configuration.dart' as config; 9 import '../theme/view_configuration.dart' as config;
10 import 'dart:math' as math; 10 import 'dart:math' as math;
11 import 'dart:sky' as sky; 11 import 'dart:sky' as sky;
12 12
13 const double _kMillisecondsPerSecond = 1000.0; 13 const double _kMillisecondsPerSecond = 1000.0;
14 14
15 double _velocityForFlingGesture(sky.GestureEvent event) { 15 double _velocityForFlingGesture(sky.GestureEvent event) {
16 return math.max(-config.kMaxFlingVelocity, math.min(config.kMaxFlingVelocity, 16 return math.max(-config.kMaxFlingVelocity, math.min(config.kMaxFlingVelocity,
17 -event.velocityY)) / _kMillisecondsPerSecond; 17 -event.velocityY)) / _kMillisecondsPerSecond;
18 } 18 }
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 } 137 }
138 138
139 void _handleFlingCancel(sky.GestureEvent event) { 139 void _handleFlingCancel(sky.GestureEvent event) {
140 _startSimulation(_createParticle()); 140 _startSimulation(_createParticle());
141 } 141 }
142 142
143 void _handleWheel(sky.WheelEvent event) { 143 void _handleWheel(sky.WheelEvent event) {
144 scrollBy(-event.offsetY); 144 scrollBy(-event.offsetY);
145 } 145 }
146 } 146 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/framework/components2/scaffold.dart ('k') | sky/sdk/lib/framework/components2/tool_bar.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698