From c858721030b2dea023cb5d0f1bdfc9c8632e0252 Mon Sep 17 00:00:00 2001 From: yuki540 Date: Mon, 2 Apr 2018 20:27:02 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=E3=83=AD=E3=83=BC=E3=83=89=E3=82=A2?= =?UTF-8?q?=E3=83=8B=E3=83=A1=E3=83=BC=E3=82=B7=E3=83=A7=E3=83=B3=E7=B5=82?= =?UTF-8?q?=E4=BA=86=E5=BE=8C=E3=81=AF=E8=A6=81=E7=B4=A0=E3=82=92=E6=B6=88?= =?UTF-8?q?=E5=8E=BB=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=99?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scripts/lib/util.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/scripts/lib/util.js b/src/scripts/lib/util.js index 390301e..c93611b 100644 --- a/src/scripts/lib/util.js +++ b/src/scripts/lib/util.js @@ -1,5 +1,7 @@ +const root = document.getElementById('root') const load_icon = document.querySelector('.load-view__body__panel__icon_type_4 .icon') const load_view = document.querySelector('.load-view') +const load_view_body_close = document.querySelector('.load-view__body__close') /** * 画像のプリロード @@ -58,5 +60,11 @@ export const startLoading = fn => { * ロードの終了 */ export const finLoad = () => { - load_view.setAttribute('data-state', 'start') + load_view.setAttribute('data-state', 'start') + + load_view_body_close.addEventListener('animationend', e => { + if(e.animationName === 'load-view__close-2') { + root.removeChild(load_view) + } + }) }