refactor(animations): single animation engine code pass

This commit is contained in:
Matias Niemelä
2017-05-02 15:45:48 -07:00
committed by Jason Aden
parent 16c8167886
commit 8a6eb1ac78
30 changed files with 395 additions and 818 deletions

View File

@ -8,10 +8,21 @@
import {AnimationPlayer, ɵStyleData} from '@angular/animations';
import {AnimationDriver} from '../animation_driver';
import {containsElement, invokeQuery, matchesElement} from '../shared';
import {WebAnimationsPlayer} from './web_animations_player';
export class WebAnimationsDriver implements AnimationDriver {
matchesElement(element: any, selector: string): boolean {
return matchesElement(element, selector);
}
containsElement(elm1: any, elm2: any): boolean { return containsElement(elm1, elm2); }
query(element: any, selector: string, multi: boolean): any[] {
return invokeQuery(element, selector, multi);
}
computeStyle(element: any, prop: string, defaultValue?: string): string {
return (window.getComputedStyle(element) as any)[prop] as string;
}