From db82dcc71b5b50565c35a4dba42fac77b43ea27c Mon Sep 17 00:00:00 2001 From: yuki540 Date: Sat, 14 Apr 2018 20:55:53 +0900 Subject: [PATCH] =?UTF-8?q?update:=20gab-animation=E3=81=AE=E9=96=8B?= =?UTF-8?q?=E5=A7=8B=E5=87=A6=E7=90=86=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scripts/lib/util.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/scripts/lib/util.js b/src/scripts/lib/util.js index c93611b..5af0876 100644 --- a/src/scripts/lib/util.js +++ b/src/scripts/lib/util.js @@ -2,6 +2,8 @@ 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') +const gab_animation = document.querySelector('.gab-animation') +const gab_animation__end_block = document.querySelector('.gab-animation__close .end-block') /** * 画像のプリロード @@ -65,6 +67,20 @@ export const finLoad = () => { load_view_body_close.addEventListener('animationend', e => { if(e.animationName === 'load-view__close-2') { root.removeChild(load_view) + startGabAnimation() + } + }) +} + +/** + * gab-animationの開始 + */ +export const startGabAnimation = () => { + gab_animation.setAttribute('data-state', 'start') + + gab_animation__end_block.addEventListener('animationend', e => { + if(e.animationName === 'gab-animation__close') { + root.removeChild(gab_animation) } }) }