perf(dialog): switch dialog animations to translate3d (#3905)

* Switches the `translate` to `translate3d` for hardware accelerated animations.
This commit is contained in:
Paul Gschwendtner
2017-04-11 08:54:57 -07:00
committed by Jeremy Elbourn
parent f412499a8a
commit 857c2171ce
+3 -3
View File
@@ -41,9 +41,9 @@ export type MdDialogContainerAnimationState = 'void' | 'enter' | 'exit' | 'exit-
encapsulation: ViewEncapsulation.None,
animations: [
trigger('slideDialog', [
state('void', style({ transform: 'translateY(25%) scale(0.9)', opacity: 0 })),
state('enter', style({ transform: 'translateY(0%) scale(1)', opacity: 1 })),
state('exit', style({ transform: 'translateY(25%)', opacity: 0 })),
state('void', style({ transform: 'translate3d(0, 25%, 0) scale(0.9)', opacity: 0 })),
state('enter', style({ transform: 'translate3d(0, 0, 0) scale(1)', opacity: 1 })),
state('exit', style({ transform: 'translate3d(0, 25%, 0)', opacity: 0 })),
transition('* => *', animate('400ms cubic-bezier(0.25, 0.8, 0.25, 1)')),
])
],