From da63c26258bbfc4301317f96fdb5791dc19ef95b Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sun, 30 Jun 2024 23:27:49 +0300 Subject: [PATCH] Remove popup animation --- public/scripts/loader.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/public/scripts/loader.js b/public/scripts/loader.js index 73ddbc084..b991e1ee0 100644 --- a/public/scripts/loader.js +++ b/public/scripts/loader.js @@ -14,7 +14,7 @@ export function showLoader() { loaderPopup = new Popup(`
-
`, POPUP_TYPE.DISPLAY, null, { transparent: true, animation: 'fast' }); + `, POPUP_TYPE.DISPLAY, null, { transparent: true, animation: 'none' }); // No close button, loaders are not closable loaderPopup.closeButton.style.display = 'none'; @@ -23,19 +23,19 @@ export function showLoader() { } export async function hideLoader() { - // Yoink preloader entirely; it only exists to cover up unstyled content while loading JS - // If it's present, we remove it once and then it's gone. - yoinkPreloader(); - if (!loaderPopup) { console.warn('There is no loader showing to hide'); return Promise.resolve(); } return new Promise((resolve) => { - //Sets up a 2-step animation. Spinner blurs/fades out, and then the loader shadow does the same (by utilizing the popup closing transition) + // Spinner blurs/fades out $('#load-spinner').on('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function () { $(`#${ELEMENT_ID}`).remove(); + // Yoink preloader entirely; it only exists to cover up unstyled content while loading JS + // If it's present, we remove it once and then it's gone. + yoinkPreloader(); + loaderPopup.complete(POPUP_RESULT.AFFIRMATIVE).then(() => { loaderPopup = null; resolve();