| Index: samples/swarm/swarm_ui_lib/touch/Scroller.dart
|
| diff --git a/samples/swarm/swarm_ui_lib/touch/Scroller.dart b/samples/swarm/swarm_ui_lib/touch/Scroller.dart
|
| index 196d910854e6e0f2a632bde7d101e7872526b291..660d08ca08cfbf9846660a7f9de3039b5f5f23e1 100644
|
| --- a/samples/swarm/swarm_ui_lib/touch/Scroller.dart
|
| +++ b/samples/swarm/swarm_ui_lib/touch/Scroller.dart
|
| @@ -351,8 +351,8 @@ class Scroller implements Draggable, MomentumDelegate {
|
| void throwDelta(num deltaX, num deltaY, [num decelerationFactor = null]) {
|
| Coordinate start = _contentOffset;
|
| Coordinate end = currentTarget;
|
| - int x = end.x.toInt();
|
| - int y = end.y.toInt();
|
| + int x = end.x.truncate();
|
| + int y = end.y.truncate();
|
| // If we are throwing in the opposite direction of the existing momentum,
|
| // cancel the current momentum.
|
| if (deltaX != 0 && deltaX.isNegative != (end.x - start.x).isNegative) {
|
| @@ -361,8 +361,8 @@ class Scroller implements Draggable, MomentumDelegate {
|
| if (deltaY != 0 && deltaY.isNegative != (end.y - start.y).isNegative) {
|
| y = start.y;
|
| }
|
| - x += deltaX.toInt();
|
| - y += deltaY.toInt();
|
| + x += deltaX.truncate();
|
| + y += deltaY.truncate();
|
| throwTo(x, y, decelerationFactor);
|
| }
|
|
|
|
|