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

Unified Diff: samples/swarm/swarm_ui_lib/touch/Scrollbar.dart

Issue 12493003: Exposing Point & Rect types (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Sync to ToT Created 7 years, 9 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 | « samples/swarm/swarm_ui_lib/touch/Geometry.dart ('k') | samples/swarm/swarm_ui_lib/touch/TouchHandler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/swarm/swarm_ui_lib/touch/Scrollbar.dart
diff --git a/samples/swarm/swarm_ui_lib/touch/Scrollbar.dart b/samples/swarm/swarm_ui_lib/touch/Scrollbar.dart
index ac6a8755ab9aa2a16a13ced0af005b502dff4c4e..1c2a6f231ba04bfb01fea1cafceafc647a94cba0 100644
--- a/samples/swarm/swarm_ui_lib/touch/Scrollbar.dart
+++ b/samples/swarm/swarm_ui_lib/touch/Scrollbar.dart
@@ -161,10 +161,10 @@ class Scrollbar implements ScrollListener {
elementOver == _horizontalElement) {
_currentScrollVertical = elementOver == _verticalElement;
if (_currentScrollVertical) {
- _currentScrollStartMouse = e.pageY;
+ _currentScrollStartMouse = e.page.y;
_currentScrollStartOffset = _scroller.getVerticalOffset();
} else {
- _currentScrollStartMouse = e.pageX;
+ _currentScrollStartMouse = e.page.x;
_currentScrollStartOffset = _scroller.getHorizontalOffset();
}
_refreshScrollRatio();
@@ -201,7 +201,7 @@ class Scrollbar implements ScrollListener {
return;
}
_refreshScrollRatio();
- int coordinate = _currentScrollVertical ? e.pageY : e.pageX;
+ int coordinate = _currentScrollVertical ? e.page.y : e.page.x;
num delta = (coordinate - _currentScrollStartMouse) * _currentScrollRatio;
if (delta != 0) {
num x;
« no previous file with comments | « samples/swarm/swarm_ui_lib/touch/Geometry.dart ('k') | samples/swarm/swarm_ui_lib/touch/TouchHandler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698