fix(overlay): animation can be interrupted

fixes #15506
This commit is contained in:
Manu Mtz.-Almeida
2018-09-14 01:41:28 +02:00
parent 6e5c035b39
commit ca5866493b
3 changed files with 68 additions and 32 deletions

View File

@@ -1152,6 +1152,9 @@ export class Animator {
* NO RECURSION
*/
_didFinish(hasCompleted: boolean) {
if (!this.isPlaying) {
return;
}
this.isPlaying = false;
this.hasCompleted = hasCompleted;
@@ -1189,6 +1192,7 @@ export class Animator {
* Recursively destroy this animation and all child animations.
*/
destroy() {
this._didFinish(false);
this._destroyed = true;
const children = this._childAnimations;