Skip to content

Commit

Permalink
fixes #7
Browse files Browse the repository at this point in the history
  • Loading branch information
xaguzman committed Aug 6, 2014
1 parent f8a587f commit 03d6299
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/src/timeline.dart
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,10 @@ class Timeline extends BaseTween<Timeline> {
_children.forEach( (BaseTween tween) => tween.update(dt));
return;
}

if (!isIterationStep && step < lastStep) {
assert (delta <= 0);
num dt = isReverse(lastStep) ? -delta-1 : delta+1;
num dt = isReverse(lastStep) ? delta + 1: -delta-1;
_children.reversed.forEach( (BaseTween tween) => tween.update(dt));
return;
}
Expand All @@ -250,32 +250,26 @@ class Timeline extends BaseTween<Timeline> {
if (step > lastStep) {
if (isReverse(step)) {
forceEndValues();
//for (int i=0, n=children.size(); i<n; i++) children.get(i).update(delta);
_children.reversed.forEach( (BaseTween tween) => tween.update(delta));
} else {
forceStartValues();
//for (int i=0, n=children.size(); i<n; i++) children.get(i).update(delta);
_children.forEach( (BaseTween tween) => tween.update(delta));
}

}else if (step < lastStep) {
if (isReverse(step)) {
forceStartValues();
//for (int i=children.size()-1; i>=0; i--) children.get(i).update(delta);
_children.reversed.forEach( (BaseTween tween) => tween.update(delta));
} else {
forceEndValues();
//for (int i=children.size()-1; i>=0; i--) children.get(i).update(delta);
_children.reversed.forEach( (BaseTween tween) => tween.update(delta));
}

}else {
num dt = isReverse(step) ? -delta : delta;
if (delta >= 0)
//for (int i=0, n=children.size(); i<n; i++) children.get(i).update(dt);
_children.forEach( (BaseTween tween) => tween.update(dt));
else
//for (int i=children.size()-1; i>=0; i--) children.get(i).update(dt);
_children.reversed.forEach( (BaseTween tween) => tween.update(dt));
}
}
Expand Down

0 comments on commit 03d6299

Please sign in to comment.