Index: samples/swarm/Views.dart |
diff --git a/samples/swarm/Views.dart b/samples/swarm/Views.dart |
index 48329c022bb640e1140a415d9537132fd26a7309..23f24b436b8692210f5d3da67680012cc85b75af 100644 |
--- a/samples/swarm/Views.dart |
+++ b/samples/swarm/Views.dart |
@@ -289,7 +289,7 @@ class GenericListView<D> extends View { |
void onResize() { |
int lastViewLength = _viewLength; |
- window.setImmediate(() { |
+ window.immediate.then((_) { |
_viewLength = _vertical ? node.offsetHeight : node.offsetWidth; |
if (_viewLength != lastViewLength) { |
if (_scrollbar != null) { |
@@ -531,7 +531,8 @@ class GenericListView<D> extends View { |
FxUtil.setTranslate(view.node, currentPosition.x, currentPosition.y, 0); |
// The view's position is unchanged except now re-parented to |
// the list view. |
- window.setTimeout(() { _positionSubview(view.node, index); }, 0); |
+ new Timer(const Duration(milliseconds: 0), |
floitsch
2013/02/13 10:03:07
Timer.run
Emily Fortuna
2013/02/13 20:19:44
Done.
|
+ () { _positionSubview(view.node, index); }); |
} else { |
_positionSubview(view.node, index); |
} |