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

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

Issue 11748016: Make ~/, round, ceil, floor, truncate return ints. Remove toInt. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Checked mode fixes. Created 7 years, 12 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
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 4516c99f971aee8ce14c9e72028716eb3de16c38..6a0d69abacec5f62b13fb64bc3f49be13c64f8cf 100644
--- a/samples/swarm/swarm_ui_lib/touch/Scrollbar.dart
+++ b/samples/swarm/swarm_ui_lib/touch/Scrollbar.dart
@@ -209,9 +209,9 @@ class Scrollbar implements ScrollListener {
_currentScrollStartOffset -= delta;
if (_currentScrollVertical) {
x = _scroller.getHorizontalOffset();
- y = _currentScrollStartOffset.toInt();
+ y = _currentScrollStartOffset.truncate();
} else {
- x = _currentScrollStartOffset.toInt();
+ x = _currentScrollStartOffset.truncate();
y = _scroller.getVerticalOffset();
}
_scroller.setPosition(x, y);

Powered by Google App Engine
This is Rietveld 408576698