From f540cfa143d1372ac50e4708c576ab9bd544cc1b Mon Sep 17 00:00:00 2001 From: yuki540 Date: Tue, 17 Apr 2018 21:00:42 +0900 Subject: [PATCH] =?UTF-8?q?update:=20end-animation=E3=81=AE=E9=96=8B?= =?UTF-8?q?=E5=A7=8B=E3=80=9C=E7=B5=82=E4=BA=86=E5=87=A6=E7=90=86=E3=82=92?= =?UTF-8?q?=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 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/scripts/lib/util.js b/src/scripts/lib/util.js index 8f01662..07ea6ee 100644 --- a/src/scripts/lib/util.js +++ b/src/scripts/lib/util.js @@ -6,6 +6,8 @@ const gab_animation = document.querySelector('.gab-animation') const gab_animation__end_block = document.querySelector('.gab-animation__close .end-block') const calling = document.querySelector('.calling') const calling__end = document.querySelector('.calling__end') +const end_animation = document.querySelector('.end-animation') +const end_animation__end = document.querySelector('.end-animation .window img') /** * 画像のプリロード @@ -98,6 +100,18 @@ export const startCalling = () => { calling__end.addEventListener('animationend', e => { if(e.animationName === 'calling__end') { root.removeChild(calling) + startEndAnimation() } }) } + +/** + * end-animationの開始 + */ +export const startEndAnimation = () => { + end_animation.setAttribute('data-state', 'start') + + end_animation__end.addEventListener('animationend', e => { + root.removeChild(end_animation) + }) +}