@@ -158,11 +158,11 @@ export class MatDialogContainer extends _MatDialogContainerBase implements OnDes
158
158
/** Host element of the dialog container component. */
159
159
private _hostElement : HTMLElement = this . _elementRef . nativeElement ;
160
160
/** Duration of the dialog open animation. */
161
- private _openAnimationDuration = this . _animationsEnabled
161
+ private _enterAnimationDuration = this . _animationsEnabled
162
162
? parseCssTime ( this . _config . enterAnimationDuration ) ?? OPEN_ANIMATION_DURATION
163
163
: 0 ;
164
164
/** Duration of the dialog close animation. */
165
- private _closeAnimationDuration = this . _animationsEnabled
165
+ private _exitAnimationDuration = this . _animationsEnabled
166
166
? parseCssTime ( this . _config . exitAnimationDuration ) ?? CLOSE_ANIMATION_DURATION
167
167
: 0 ;
168
168
/** Current timer for dialog animations. */
@@ -218,19 +218,19 @@ export class MatDialogContainer extends _MatDialogContainerBase implements OnDes
218
218
219
219
/** Starts the dialog open animation if enabled. */
220
220
private _startOpenAnimation ( ) {
221
- this . _animationStateChanged . emit ( { state : 'opening' , totalTime : this . _openAnimationDuration } ) ;
221
+ this . _animationStateChanged . emit ( { state : 'opening' , totalTime : this . _enterAnimationDuration } ) ;
222
222
223
223
if ( this . _animationsEnabled ) {
224
224
this . _hostElement . style . setProperty (
225
225
TRANSITION_DURATION_PROPERTY ,
226
- `${ this . _openAnimationDuration } ms` ,
226
+ `${ this . _enterAnimationDuration } ms` ,
227
227
) ;
228
228
229
229
// We need to give the `setProperty` call from above some time to be applied.
230
230
// One would expect that the open class is added once the animation finished, but MDC
231
231
// uses the open class in combination with the opening class to start the animation.
232
232
this . _requestAnimationFrame ( ( ) => this . _hostElement . classList . add ( OPENING_CLASS , OPEN_CLASS ) ) ;
233
- this . _waitForAnimationToComplete ( this . _openAnimationDuration , this . _finishDialogOpen ) ;
233
+ this . _waitForAnimationToComplete ( this . _enterAnimationDuration , this . _finishDialogOpen ) ;
234
234
} else {
235
235
this . _hostElement . classList . add ( OPEN_CLASS ) ;
236
236
// Note: We could immediately finish the dialog opening here with noop animations,
@@ -246,18 +246,18 @@ export class MatDialogContainer extends _MatDialogContainerBase implements OnDes
246
246
* called by the dialog ref.
247
247
*/
248
248
_startExitAnimation ( ) : void {
249
- this . _animationStateChanged . emit ( { state : 'closing' , totalTime : this . _closeAnimationDuration } ) ;
249
+ this . _animationStateChanged . emit ( { state : 'closing' , totalTime : this . _exitAnimationDuration } ) ;
250
250
this . _hostElement . classList . remove ( OPEN_CLASS ) ;
251
251
252
252
if ( this . _animationsEnabled ) {
253
253
this . _hostElement . style . setProperty (
254
254
TRANSITION_DURATION_PROPERTY ,
255
- `${ this . _openAnimationDuration } ms` ,
255
+ `${ this . _exitAnimationDuration } ms` ,
256
256
) ;
257
257
258
258
// We need to give the `setProperty` call from above some time to be applied.
259
259
this . _requestAnimationFrame ( ( ) => this . _hostElement . classList . add ( CLOSING_CLASS ) ) ;
260
- this . _waitForAnimationToComplete ( this . _closeAnimationDuration , this . _finishDialogClose ) ;
260
+ this . _waitForAnimationToComplete ( this . _exitAnimationDuration , this . _finishDialogClose ) ;
261
261
} else {
262
262
// This subscription to the `OverlayRef#backdropClick` observable in the `DialogRef` is
263
263
// set up before any user can subscribe to the backdrop click. The subscription triggers
@@ -286,7 +286,7 @@ export class MatDialogContainer extends _MatDialogContainerBase implements OnDes
286
286
*/
287
287
private _finishDialogOpen = ( ) => {
288
288
this . _clearAnimationClasses ( ) ;
289
- this . _openAnimationDone ( this . _openAnimationDuration ) ;
289
+ this . _openAnimationDone ( this . _enterAnimationDuration ) ;
290
290
} ;
291
291
292
292
/**
@@ -295,7 +295,7 @@ export class MatDialogContainer extends _MatDialogContainerBase implements OnDes
295
295
*/
296
296
private _finishDialogClose = ( ) => {
297
297
this . _clearAnimationClasses ( ) ;
298
- this . _animationStateChanged . emit ( { state : 'closed' , totalTime : this . _closeAnimationDuration } ) ;
298
+ this . _animationStateChanged . emit ( { state : 'closed' , totalTime : this . _exitAnimationDuration } ) ;
299
299
} ;
300
300
301
301
/** Clears all dialog animation classes. */
0 commit comments