feat(animations): introduce a wave of new animation features

This commit is contained in:
Matias Niemelä
2017-04-26 10:44:28 -07:00
committed by Jason Aden
parent d761059e4d
commit 16c8167886
55 changed files with 7732 additions and 2217 deletions

View File

@ -9,21 +9,30 @@ import {ɵStyleData} from '@angular/animations';
import {AnimationEngineInstruction, AnimationTransitionInstructionType} from '../render/animation_engine_instruction';
export interface AnimationTimelineInstruction extends AnimationEngineInstruction {
element: any;
keyframes: ɵStyleData[];
preStyleProps: string[];
postStyleProps: string[];
duration: number;
delay: number;
totalTime: number;
easing: string|null|undefined;
easing: string|null;
stretchStartingKeyframe?: boolean;
subTimeline: boolean;
}
export function createTimelineInstruction(
keyframes: ɵStyleData[], duration: number, delay: number,
easing: string | null | undefined): AnimationTimelineInstruction {
element: any, keyframes: ɵStyleData[], preStyleProps: string[], postStyleProps: string[],
duration: number, delay: number, easing: string | null = null,
subTimeline: boolean = false): AnimationTimelineInstruction {
return {
type: AnimationTransitionInstructionType.TimelineAnimation,
element,
keyframes,
preStyleProps,
postStyleProps,
duration,
delay,
totalTime: duration + delay, easing
totalTime: duration + delay, easing, subTimeline
};
}