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

Side by Side Diff: client/view/SliderMenu.dart

Issue 8360025: Move the individual property definitions from client/base/Css to CSSStyleDeclaration. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes. Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « client/view/PagedViews.dart ('k') | client/view/view.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 typedef void SelectHandler(String menuText); 5 typedef void SelectHandler(String menuText);
6 6
7 /** 7 /**
8 * This implements a horizontal menu bar with a sliding triangle arrow 8 * This implements a horizontal menu bar with a sliding triangle arrow
9 * that points at the currently selected item. 9 * that points at the currently selected item.
10 */ 10 */
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 if (selectedItem != null) { 157 if (selectedItem != null) {
158 // calculate where we want to put the triangle 158 // calculate where we want to put the triangle
159 x = selectedItem.offsetLeft + 159 x = selectedItem.offsetLeft +
160 selectedItem.offsetWidth / 2 - TRIANGLE_WIDTH / 2; 160 selectedItem.offsetWidth / 2 - TRIANGLE_WIDTH / 2;
161 } 161 }
162 162
163 // find the slider filler (the div element to the left of the 163 // find the slider filler (the div element to the left of the
164 // triangle) set its width the push the triangle to where we want it. 164 // triangle) set its width the push the triangle to where we want it.
165 String duration = animate ? '.3s' : '0s'; 165 String duration = animate ? '.3s' : '0s';
166 final triangle = node.query('.sm-triangle'); 166 final triangle = node.query('.sm-triangle');
167 Css.setTransitionDuration(triangle.style, duration); 167 triangle.style.transitionDuration = duration;
168 FxUtil.setWebkitTransform(triangle, x, 0); 168 FxUtil.setWebkitTransform(triangle, x, 0);
169 } 169 }
170 } 170 }
OLDNEW
« 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