OLD | NEW |
1 part of view; | |
2 | |
3 // 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 |
4 // 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 |
5 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
6 | 4 |
7 typedef void SelectHandler(String menuText); | 5 typedef void SelectHandler(String menuText); |
8 | 6 |
9 /** | 7 /** |
10 * This implements a horizontal menu bar with a sliding triangle arrow | 8 * This implements a horizontal menu bar with a sliding triangle arrow |
11 * that points at the currently selected item. | 9 * that points at the currently selected item. |
12 */ | 10 */ |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 167 |
170 void _moveIndicator(num x, bool animate) { | 168 void _moveIndicator(num x, bool animate) { |
171 // find the slider filler (the div element to the left of the | 169 // find the slider filler (the div element to the left of the |
172 // triangle) set its width the push the triangle to where we want it. | 170 // triangle) set its width the push the triangle to where we want it. |
173 String duration = animate ? '.3s' : '0s'; | 171 String duration = animate ? '.3s' : '0s'; |
174 final triangle = node.query('.sm-triangle'); | 172 final triangle = node.query('.sm-triangle'); |
175 triangle.style.transitionDuration = duration; | 173 triangle.style.transitionDuration = duration; |
176 FxUtil.setWebkitTransform(triangle, x, 0); | 174 FxUtil.setWebkitTransform(triangle, x, 0); |
177 } | 175 } |
178 } | 176 } |
OLD | NEW |