diff --git a/frontend/src/app/shared/components/confirmation/confirmation.component.ts b/frontend/src/app/shared/components/confirmation/confirmation.component.ts index 0e0d202..d407985 100644 --- a/frontend/src/app/shared/components/confirmation/confirmation.component.ts +++ b/frontend/src/app/shared/components/confirmation/confirmation.component.ts @@ -1,4 +1,13 @@ -import { Component, ElementRef, EventEmitter, Input, Output, ViewChild, AfterViewInit, OnDestroy } from '@angular/core'; +import { + Component, + ElementRef, + EventEmitter, + Input, + Output, + ViewChild, + AfterViewInit, + OnDestroy, +} from '@angular/core'; import { ModalAnimationService } from '../../services/modal-animation.service'; import gsap from 'gsap'; @@ -27,10 +36,7 @@ export class ConfirmationComponent implements AfterViewInit, OnDestroy { } private openModal() { - this.modalAnimationService.openModal( - this.modalCard.nativeElement, - this.modalBg.nativeElement - ); + this.modalAnimationService.openModal(this.modalCard.nativeElement, this.modalBg.nativeElement); } public closeModal() { diff --git a/frontend/src/app/shared/services/modal-animation.service.ts b/frontend/src/app/shared/services/modal-animation.service.ts index 9dc11bd..f54c2bc 100644 --- a/frontend/src/app/shared/services/modal-animation.service.ts +++ b/frontend/src/app/shared/services/modal-animation.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'; import gsap from 'gsap'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class ModalAnimationService { private readonly defaultDuration = 0.3; @@ -10,17 +10,17 @@ export class ModalAnimationService { openModal(modalElement: HTMLElement, overlayElement: HTMLElement) { gsap.set(overlayElement, { opacity: 0, display: 'block' }); - gsap.set(modalElement, { - opacity: 0, + gsap.set(modalElement, { + opacity: 0, scale: 0.95, y: 20, - display: 'block' + display: 'block', }); gsap.to(overlayElement, { opacity: 1, duration: this.defaultDuration, - ease: this.defaultEase + ease: this.defaultEase, }); gsap.to(modalElement, { @@ -28,7 +28,7 @@ export class ModalAnimationService { scale: 1, y: 0, duration: this.defaultDuration, - ease: this.defaultEase + ease: this.defaultEase, }); } @@ -40,14 +40,14 @@ export class ModalAnimationService { onComplete: () => { gsap.set([overlayElement, modalElement], { display: 'none' }); onComplete?.(); - } + }, }); gsap.to(modalElement, { scale: 0.95, y: 20, duration: this.defaultDuration, - ease: this.defaultEase + ease: this.defaultEase, }); } -} \ No newline at end of file +}