| 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 /** | 5 /** |
| 6 * A solar system visualization. | 6 * A solar system visualization. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 library solar3d; | 9 library solar3d; |
| 10 | 10 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 if (event.keyCode == keyCodeE) { | 166 if (event.keyCode == keyCodeE) { |
| 167 solarSystem.selectPlanet('Earth'); | 167 solarSystem.selectPlanet('Earth'); |
| 168 } | 168 } |
| 169 } | 169 } |
| 170 | 170 |
| 171 void mouseMove(MouseEvent event) { | 171 void mouseMove(MouseEvent event) { |
| 172 if (!ownMouse) { | 172 if (!ownMouse) { |
| 173 // We don't rotate the view if we don't own the mouse | 173 // We don't rotate the view if we don't own the mouse |
| 174 return; | 174 return; |
| 175 } | 175 } |
| 176 controller.accumScroll += event.movementY; | 176 controller.accumScroll += event.movement.y; |
| 177 event.preventDefault(); | 177 event.preventDefault(); |
| 178 } | 178 } |
| 179 | 179 |
| 180 void mouseWheel(MouseEvent event) { | 180 void mouseWheel(MouseEvent event) { |
| 181 if (!ownMouse) { | 181 if (!ownMouse) { |
| 182 // We don't rotate the view if we don't own the mouse | 182 // We don't rotate the view if we don't own the mouse |
| 183 return; | 183 return; |
| 184 } | 184 } |
| 185 if (event is WheelEvent) { | 185 if (event is WheelEvent) { |
| 186 WheelEvent e = event; | 186 WheelEvent e = event; |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 print(log); | 526 print(log); |
| 527 } | 527 } |
| 528 } | 528 } |
| 529 | 529 |
| 530 /** | 530 /** |
| 531 * The entry point to the application. | 531 * The entry point to the application. |
| 532 */ | 532 */ |
| 533 void main() { | 533 void main() { |
| 534 application.startup('#container'); | 534 application.startup('#container'); |
| 535 } | 535 } |
| OLD | NEW |