fix(animations): ensure starting styles are applied when a delay is present

Closes #9326
Closes #9328
This commit is contained in:
Matias Niemelä
2016-06-17 16:49:05 -07:00
parent ca42b49fa2
commit ba46ca683b
2 changed files with 17 additions and 3 deletions

View File

@ -39,9 +39,13 @@ export class WebAnimationsDriver implements AnimationDriver {
formattedSteps = [start, start];
}
var player = this._triggerWebAnimation(
anyElm, formattedSteps,
{'duration': duration, 'delay': delay, 'easing': easing, 'fill': 'forwards'});
var playerOptions = {
'duration': duration,
'delay': delay,
'fill': 'both' // we use `both` because it allows for styling at 0% to work with `delay`
};
var player = this._triggerWebAnimation(anyElm, formattedSteps, playerOptions);
return new WebAnimationsPlayer(player, duration);
}