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

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

Issue 12087004: Changing window.requestLayoutFrame into a microtask API (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
Index: samples/swarm/swarm_ui_lib/view/SliderMenu.dart
diff --git a/samples/swarm/swarm_ui_lib/view/SliderMenu.dart b/samples/swarm/swarm_ui_lib/view/SliderMenu.dart
index 20a58a76ef122067bd3d631938e4705f0f2184a7..2561ce667cf0e9a43e538e5b5cfa7abb1a50ad3e 100644
--- a/samples/swarm/swarm_ui_lib/view/SliderMenu.dart
+++ b/samples/swarm/swarm_ui_lib/view/SliderMenu.dart
@@ -157,7 +157,7 @@ class SliderMenu extends View {
void updateIndicator(bool animate) {
if (selectedItem != null) {
// calculate where we want to put the triangle
- window.requestLayoutFrame(() {
+ window.setImmediate(() {
num x = selectedItem.offsetLeft +
selectedItem.offsetWidth / 2 - TRIANGLE_WIDTH / 2;
_moveIndicator(x, animate);

Powered by Google App Engine
This is Rietveld 408576698