update: callingの開始〜終了処理を実装

This commit is contained in:
yuki540 2018-04-16 23:38:31 +09:00
parent 0bd3dbac4c
commit 4398fb150f
3 changed files with 18 additions and 2 deletions

View File

@ -235,7 +235,7 @@
</div>
</section>
<!--********************************** calling ***************************************-->
<section class="calling" data-state="start">
<section class="calling">
<section class="calling__bg">
<div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div>

View File

@ -4,6 +4,8 @@ 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')
const calling = document.querySelector('.calling')
const calling__end = document.querySelector('.calling__end')
/**
* 画像のプリロード
@ -82,6 +84,20 @@ export const startGabAnimation = () => {
if(e.animationName === 'gab-animation__close'
|| e.animationName === 'gab-animation__close__sp') {
root.removeChild(gab_animation)
startCalling()
}
})
}
/**
* callingの開始
*/
export const startCalling = () => {
calling.setAttribute('data-state', 'start')
calling__end.addEventListener('animationend', e => {
if(e.animationName === 'calling__end') {
root.removeChild(calling)
}
})
}

View File

@ -6,7 +6,7 @@
min-width: $min-width; min-height: $min-height;
background-color: $theme-purple;
overflow: hidden;
z-index: 1001;
z-index: 998;
}
/*** bg ***/