mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
perf(dialog): switch dialog animations to translate3d (#3905)
* Switches the `translate` to `translate3d` for hardware accelerated animations.
This commit is contained in:
committed by
Jeremy Elbourn
parent
f412499a8a
commit
857c2171ce
@@ -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)')),
|
||||
])
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user