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

Unified Diff: samples/swarm/Views.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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/UIState.dart ('k') | samples/swarm/swarm_ui_lib/base/AnimationScheduler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/swarm/Views.dart
diff --git a/samples/swarm/Views.dart b/samples/swarm/Views.dart
index a562a374c647982ce84e64e13ee95a0eb99052fd..f282f9e2c3b80c149b63b67d51385aac9d585ecb 100644
--- a/samples/swarm/Views.dart
+++ b/samples/swarm/Views.dart
@@ -171,7 +171,7 @@ class GenericListView<D> extends View {
}
Collection<View> get childViews {
- return _itemViews.values;
+ return _itemViews.values.toList();
}
void _onClick(MouseEvent e) {
@@ -691,14 +691,13 @@ class FixedSizeListViewLayout<D> implements ListViewLayout<D> {
Interval computeVisibleInterval(
num offset, num viewLength, num bufferLength) {
- num targetIntervalStart =
- Math.max(0,((-offset - bufferLength) / _itemLength).floor());
+ int targetIntervalStart =
+ Math.max(0, (-offset - bufferLength) ~/ _itemLength);
num targetIntervalEnd = GoogleMath.clamp(
((-offset + viewLength + bufferLength) / _itemLength).ceil(),
targetIntervalStart,
_data.length);
- return new Interval(targetIntervalStart.toInt(),
- targetIntervalEnd.toInt());
+ return new Interval(targetIntervalStart, targetIntervalEnd.toInt());
}
}
« no previous file with comments | « samples/swarm/UIState.dart ('k') | samples/swarm/swarm_ui_lib/base/AnimationScheduler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698