| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 library clock; | 5 library clock; |
| 6 | 6 |
| 7 import 'dart:async'; |
| 7 import 'dart:html'; | 8 import 'dart:html'; |
| 8 import 'dart:math'; | 9 import 'dart:math'; |
| 9 | 10 |
| 10 part 'balls.dart'; | 11 part 'balls.dart'; |
| 11 part 'numbers.dart'; | 12 part 'numbers.dart'; |
| 12 | 13 |
| 13 void main() { | 14 void main() { |
| 14 new CountDownClock(); | 15 new CountDownClock(); |
| 15 } | 16 } |
| 16 | 17 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 156 |
| 156 void setElementPosition(Element elem, double x, double y) { | 157 void setElementPosition(Element elem, double x, double y) { |
| 157 elem.style.transform = 'translate(${x}px, ${y}px)'; | 158 elem.style.transform = 'translate(${x}px, ${y}px)'; |
| 158 } | 159 } |
| 159 | 160 |
| 160 void setElementSize(Element elem, double l, double t, double r, double b) { | 161 void setElementSize(Element elem, double l, double t, double r, double b) { |
| 161 setElementPosition(elem, l, t); | 162 setElementPosition(elem, l, t); |
| 162 elem.style.right = "${r}px"; | 163 elem.style.right = "${r}px"; |
| 163 elem.style.bottom = "${b}px"; | 164 elem.style.bottom = "${b}px"; |
| 164 } | 165 } |
| OLD | NEW |