Skip to content

Commit

Permalink
perf(dialog): switch dialog animations to translate3d (#3905)
Browse files Browse the repository at this point in the history
* Switches the `translate` to `translate3d` for hardware accelerated animations.
  • Loading branch information
devversion authored and jelbourn committed Apr 11, 2017
1 parent f412499 commit 857c217
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/dialog/dialog-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)')),
])
],
Expand Down

0 comments on commit 857c217

Please sign in to comment.