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

Unified Diff: samples/swarm/swarm_ui_lib/view/PagedViews.dart

Issue 12317107: ceil/floor/truncate/round return integers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload due to error3 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/Momentum.dart ('k') | samples/third_party/dromaeo/Dromaeo.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/swarm/swarm_ui_lib/view/PagedViews.dart
diff --git a/samples/swarm/swarm_ui_lib/view/PagedViews.dart b/samples/swarm/swarm_ui_lib/view/PagedViews.dart
index 2650532b39ee7914ce26f8378116a71565ab5ae7..e7bf4914b8c37309d4202dba533a7e1cba04376b 100644
--- a/samples/swarm/swarm_ui_lib/view/PagedViews.dart
+++ b/samples/swarm/swarm_ui_lib/view/PagedViews.dart
@@ -173,7 +173,7 @@ class PagedColumnView extends View {
if (value.endsWith('px')) {
value = value.substring(0, value.length - 2);
}
- return double.parse(value).round().toInt();
+ return double.parse(value).round();
}
/** Watch for resize and update page count. */
@@ -194,7 +194,7 @@ class PagedColumnView extends View {
window.setImmediate(() {
if (_container.scrollWidth > _container.offset.width) {
pageLength = (_container.scrollWidth / _computePageSize(_container))
- .ceil().toInt();
+ .ceil();
}
pageLength = Math.max(pageLength, 1);
@@ -219,7 +219,7 @@ class PagedColumnView extends View {
window.setImmediate(() {
num current = scroller.contentOffset.x;
int pageSize = _computePageSize(_container);
- pages.current.value = -(current / pageSize).round().toInt();
+ pages.current.value = -(current / pageSize).round();
});
}
@@ -247,7 +247,6 @@ class PagedColumnView extends View {
pageNumber = pageNumber.round();
}
}
- pageNumber = pageNumber.toInt();
num translate = -pageNumber * pageSize;
pages.current.value = pageNumber;
if (currentTarget != translate) {
« no previous file with comments | « samples/swarm/swarm_ui_lib/touch/Momentum.dart ('k') | samples/third_party/dromaeo/Dromaeo.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698