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

Unified Diff: client/view/SliderMenu.dart

Issue 9145004: Revert "Example showing alternate async measurement solution" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | « client/view/PagedViews.dart ('k') | client/view/view.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/view/SliderMenu.dart
diff --git a/client/view/SliderMenu.dart b/client/view/SliderMenu.dart
index 4901eef1ccbca3a31858f9c73cfa695659da3176..c10cb2ffe6d6fa9f8245433bc10d65966cc352fb 100644
--- a/client/view/SliderMenu.dart
+++ b/client/view/SliderMenu.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -155,10 +155,10 @@ class SliderMenu extends View {
void updateIndicator(bool animate) {
if (selectedItem != null) {
// calculate where we want to put the triangle
- window.requestMeasurementFrame(() {
- final offsetRect = selectedItem.rect.offset;
- num x = offsetRect.left + offsetRect.width / 2 - TRIANGLE_WIDTH / 2;
- return () { _moveIndicator(x, animate); };
+ selectedItem.rect.then((ElementRect rect) {
+ num x = rect.offset.left +
+ rect.offset.width / 2 - TRIANGLE_WIDTH / 2;
+ _moveIndicator(x, animate);
});
} else {
_moveIndicator(0, animate);
« no previous file with comments | « client/view/PagedViews.dart ('k') | client/view/view.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698