2017-02-22 15:14:49 -08:00
|
|
|
/**
|
|
|
|
* @license
|
|
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
|
|
* found in the LICENSE file at https://angular.io/license
|
|
|
|
*/
|
|
|
|
|
2017-04-26 10:44:28 -07:00
|
|
|
import {ɵStyleData} from '@angular/animations';
|
2017-02-24 00:32:19 -08:00
|
|
|
import {AnimationPlayer, NoopAnimationPlayer} from '@angular/animations';
|
2017-02-22 15:14:49 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @experimental
|
|
|
|
*/
|
2017-02-24 00:32:19 -08:00
|
|
|
export class NoopAnimationDriver implements AnimationDriver {
|
2017-04-26 10:44:28 -07:00
|
|
|
computeStyle(element: any, prop: string, defaultValue?: string): string {
|
|
|
|
return defaultValue || '';
|
|
|
|
}
|
|
|
|
|
2017-02-22 15:14:49 -08:00
|
|
|
animate(
|
|
|
|
element: any, keyframes: {[key: string]: string | number}[], duration: number, delay: number,
|
|
|
|
easing: string, previousPlayers: any[] = []): AnimationPlayer {
|
2017-02-24 00:32:19 -08:00
|
|
|
return new NoopAnimationPlayer();
|
2017-02-22 15:14:49 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @experimental
|
|
|
|
*/
|
|
|
|
export abstract class AnimationDriver {
|
2017-02-24 00:32:19 -08:00
|
|
|
static NOOP: AnimationDriver = new NoopAnimationDriver();
|
2017-04-26 10:44:28 -07:00
|
|
|
|
|
|
|
abstract computeStyle(element: any, prop: string, defaultValue?: string): string;
|
|
|
|
|
2017-02-22 15:14:49 -08:00
|
|
|
abstract animate(
|
|
|
|
element: any, keyframes: {[key: string]: string | number}[], duration: number, delay: number,
|
2017-03-24 09:56:34 -07:00
|
|
|
easing?: string|null, previousPlayers?: any[]): any;
|
2017-02-22 15:14:49 -08:00
|
|
|
}
|