fix the issue that an iOS animation promise may never be resolved nor rejected

This commit is contained in:
genexliu
2015-08-14 17:53:04 +08:00
parent 1f8bcc565c
commit 72e490a036

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();
}