refactor(animations): single animation engine code pass
This commit is contained in:

committed by
Jason Aden

parent
16c8167886
commit
8a6eb1ac78
@ -8,6 +8,8 @@
|
||||
import {AUTO_STYLE, AnimationPlayer, NoopAnimationPlayer, ɵStyleData} from '@angular/animations';
|
||||
|
||||
import {AnimationDriver} from '../../src/render/animation_driver';
|
||||
import {containsElement, invokeQuery, matchesElement} from '../../src/render/shared';
|
||||
|
||||
|
||||
/**
|
||||
* @experimental Animation support is experimental.
|
||||
@ -15,6 +17,16 @@ import {AnimationDriver} from '../../src/render/animation_driver';
|
||||
export class MockAnimationDriver implements AnimationDriver {
|
||||
static log: AnimationPlayer[] = [];
|
||||
|
||||
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 defaultValue || '';
|
||||
}
|
||||
|
Reference in New Issue
Block a user