fix(animations): make sure the easing value is passed into the web-animations player
Closes #9517 Closes #9523
This commit is contained in:
parent
ae75e3640a
commit
c43aec2182
|
@ -50,6 +50,7 @@ export class WebAnimationsDriver implements AnimationDriver {
|
||||||
var playerOptions = {
|
var playerOptions = {
|
||||||
'duration': duration,
|
'duration': duration,
|
||||||
'delay': delay,
|
'delay': delay,
|
||||||
|
'easing': easing,
|
||||||
'fill': 'both' // we use `both` because it allows for styling at 0% to work with `delay`
|
'fill': 'both' // we use `both` because it allows for styling at 0% to work with `delay`
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -92,5 +92,15 @@ export function main() {
|
||||||
var options = details['options'];
|
var options = details['options'];
|
||||||
expect(options['fill']).toEqual('both');
|
expect(options['fill']).toEqual('both');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should apply the provided easing', () => {
|
||||||
|
var startingStyles = _makeStyles({});
|
||||||
|
var styles = [_makeKeyframe(0, {'color': 'green'}), _makeKeyframe(1, {'color': 'red'})];
|
||||||
|
|
||||||
|
driver.animate(elm, startingStyles, styles, 1000, 1000, 'ease-out');
|
||||||
|
var details = driver.log.pop();
|
||||||
|
var options = details['options'];
|
||||||
|
expect(options['easing']).toEqual('ease-out');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue