fix(animations): ensure all child elements are rendered before running animations
Closes #9402 Closes #9775 Closes #9887
This commit is contained in:
@ -14,7 +14,7 @@ import {AnimationDriver} from '../src/dom/animation_driver';
|
||||
import {StringMapWrapper} from '../src/facade/collection';
|
||||
|
||||
export class MockAnimationDriver extends AnimationDriver {
|
||||
log: any[] /** TODO #9100 */ = [];
|
||||
public log: {[key: string]: any}[] = [];
|
||||
animate(
|
||||
element: any, startingStyles: AnimationStyles, keyframes: AnimationKeyframe[],
|
||||
duration: number, delay: number, easing: string): AnimationPlayer {
|
||||
@ -38,11 +38,9 @@ function _serializeKeyframes(keyframes: AnimationKeyframe[]): any[] {
|
||||
}
|
||||
|
||||
function _serializeStyles(styles: AnimationStyles): {[key: string]: any} {
|
||||
var flatStyles = {};
|
||||
styles.styles.forEach(
|
||||
entry => StringMapWrapper.forEach(
|
||||
entry, (val: any /** TODO #9100 */, prop: any /** TODO #9100 */) => {
|
||||
(flatStyles as any /** TODO #9100 */)[prop] = val;
|
||||
}));
|
||||
var flatStyles: {[key: string]: any} = {};
|
||||
styles.styles.forEach(entry => StringMapWrapper.forEach(entry, (val: any, prop: string) => {
|
||||
flatStyles[prop] = val;
|
||||
}));
|
||||
return flatStyles;
|
||||
}
|
||||
|
Reference in New Issue
Block a user