Call animation callback in a timeout

This commit is contained in:
Tim Schaub
2018-02-08 15:25:45 -07:00
parent 3d817ff7e7
commit 4a527eb763
2 changed files with 54 additions and 25 deletions

View File

@@ -289,7 +289,9 @@ View.prototype.animate = function(var_args) {
this.setRotation(state.rotation);
}
if (callback) {
callback(true);
setTimeout(function() {
callback(true);
}, 0);
}
return;
}
@@ -454,7 +456,9 @@ View.prototype.updateAnimations_ = function() {
this.setHint(ViewHint.ANIMATING, -1);
const callback = series[0].callback;
if (callback) {
callback(true);
setTimeout(function() {
callback(true);
}, 0);
}
}
}