File tree Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -1018,22 +1018,8 @@ export abstract class _TooltipComponentBase implements OnDestroy {
1018
1018
const tooltip = this . _tooltip . nativeElement ;
1019
1019
const showClass = this . _showAnimation ;
1020
1020
const hideClass = this . _hideAnimation ;
1021
-
1022
- if ( isVisible ) {
1023
- tooltip . classList . remove ( hideClass ) ;
1024
- tooltip . classList . add ( showClass ) ;
1025
- }
1026
-
1027
- if ( ! isVisible ) {
1028
- // It's avoids the problem when `mat-tooltip-hide` triggers the animation of
1029
- // a tooltip that has not been shown yet.
1030
- if ( tooltip . classList . contains ( showClass ) ) {
1031
- tooltip . classList . add ( hideClass ) ;
1032
- }
1033
-
1034
- tooltip . classList . remove ( showClass ) ;
1035
- }
1036
-
1021
+ tooltip . classList . remove ( isVisible ? hideClass : showClass ) ;
1022
+ tooltip . classList . add ( isVisible ? showClass : hideClass ) ;
1037
1023
this . _isVisible = isVisible ;
1038
1024
1039
1025
// It's common for internal apps to disable animations using `* { animation: none !important }`
You can’t perform that action at this time.
0 commit comments