fix(animations): ensure all child elements are rendered before running animations

Closes #9402
Closes #9775
Closes #9887
This commit is contained in:
Matias Niemelä
2016-07-01 16:01:57 -07:00
parent daa9da4047
commit c3bdd504d0
20 changed files with 340 additions and 80 deletions

View File

@ -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;
}