OLD | NEW |
1 part of touch; | |
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 /** | 5 /** |
8 * Implementations can be used to simulate the deceleration of an element within | 6 * Implementations can be used to simulate the deceleration of an element within |
9 * a certain region. To use this behavior you need to provide an initial | 7 * a certain region. To use this behavior you need to provide an initial |
10 * velocity that is meant to represent the gesture that is initiating this | 8 * velocity that is meant to represent the gesture that is initiating this |
11 * deceleration. You also provide the bounds of the region that the element | 9 * deceleration. You also provide the bounds of the region that the element |
12 * exists in, and the current offset of the element within that region. The | 10 * exists in, and the current offset of the element within that region. The |
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 | 545 |
548 Coordinate get destination { | 546 Coordinate get destination { |
549 if (!_moves.isEmpty()) { | 547 if (!_moves.isEmpty()) { |
550 final lastMove = _moves.last(); | 548 final lastMove = _moves.last(); |
551 return new Coordinate(lastMove.x, lastMove.y); | 549 return new Coordinate(lastMove.x, lastMove.y); |
552 } else { | 550 } else { |
553 return null; | 551 return null; |
554 } | 552 } |
555 } | 553 } |
556 } | 554 } |
OLD | NEW |