Skip to content

Commit

Permalink
fix(overlay): implement removeModalClasses method #9882
Browse files Browse the repository at this point in the history
  • Loading branch information
PlamenaMiteva committed Oct 4, 2021
1 parent 550c0ed commit 709b5fe
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion projects/igniteui-angular/src/lib/services/overlay/overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,9 @@ export class IgxOverlayService implements OnDestroy {
document,
true,
info.settings.target);
this.addModalClasses(info);
if (info.settings.positionStrategy.settings.openAnimation) {
this.buildAnimationPlayers(info);
this.addModalClasses(info);
this.playOpenAnimation(info);
} else {
// to eliminate flickering show the element just before opened fires
Expand Down Expand Up @@ -534,6 +534,7 @@ export class IgxOverlayService implements OnDestroy {
return;
}
if (info.settings.positionStrategy.settings.closeAnimation) {
this.removeModalClasses(info);
this.playCloseAnimation(info, event);
} else {
this.closeDone(info);
Expand Down Expand Up @@ -887,6 +888,14 @@ export class IgxOverlayService implements OnDestroy {
}
}

private removeModalClasses(info: OverlayInfo) {
if (info.settings.modal) {
const wrapperElement = info.elementRef.nativeElement.parentElement.parentElement;
wrapperElement.classList.remove('igx-overlay__wrapper--modal');
wrapperElement.classList.add('igx-overlay__wrapper');
}
}

private buildAnimationPlayers(info: OverlayInfo) {
if (info.settings.positionStrategy.settings.openAnimation) {
const animationBuilder = this.builder.build(info.settings.positionStrategy.settings.openAnimation);
Expand Down

0 comments on commit 709b5fe

Please sign in to comment.