Merge pull request #588 from genexliu/feature/fix_issue_587

fix the issue that an iOS animation promise may never be resolved nor rejected
This commit is contained in:
Rossen Hristov
2015-08-18 11:22:54 +03:00

View File

@@ -96,7 +96,7 @@ export class Animation extends common.Animation implements definition.Animation
that._finishedAnimations++;
}
if (that._cancelledAnimations === that._mergedPropertyAnimations.length) {
if (that._cancelledAnimations > 0 && (that._cancelledAnimations + that._finishedAnimations) === that._mergedPropertyAnimations.length) {
trace.write(that._cancelledAnimations + " animations cancelled.", trace.categories.Animation);
that._rejectAnimationFinishedPromise();
}