update: スキップボタンの表示・アニメーションスキップ処理を実装
This commit is contained in:
parent
cabe6f9423
commit
104f9bbb56
@ -1,5 +1,4 @@
|
|||||||
import riot from 'riot'
|
import riot from 'riot'
|
||||||
import route from 'riot-route'
|
|
||||||
import * as util from './lib/util'
|
import * as util from './lib/util'
|
||||||
import preload_json from './config/preload'
|
import preload_json from './config/preload'
|
||||||
import history_json from './config/history'
|
import history_json from './config/history'
|
||||||
@ -20,6 +19,7 @@ util.bindCloseBtn()
|
|||||||
util.startLoading(() => {
|
util.startLoading(() => {
|
||||||
util.preload(preload_json, () => {
|
util.preload(preload_json, () => {
|
||||||
util.finLoad()
|
util.finLoad()
|
||||||
|
util.showSkipButton()
|
||||||
}, data => {})
|
}, data => {})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -129,6 +129,34 @@ export const hiddenPage = () => {
|
|||||||
document.querySelector('.product-page').style.display = 'none'
|
document.querySelector('.product-page').style.display = 'none'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* スキップボタンの表示
|
||||||
|
*/
|
||||||
|
export const showSkipButton = () => {
|
||||||
|
const skip_button = document.getElementById('skip-button')
|
||||||
|
skip_button.setAttribute('data-state', 'true')
|
||||||
|
|
||||||
|
/* click ---------------------------------------------------------------- */
|
||||||
|
skip_button.addEventListener('click', e => {
|
||||||
|
e.target.setAttribute('data-state', 'false')
|
||||||
|
skipAnimation()
|
||||||
|
})
|
||||||
|
|
||||||
|
setTimeout(() => { skip_button.setAttribute('data-state', 'false') }, 5000)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* アニメーションをスキップ
|
||||||
|
*/
|
||||||
|
export const skipAnimation = () => {
|
||||||
|
if(load_view) root.removeChild(load_view)
|
||||||
|
if(gab_animation) root.removeChild(gab_animation)
|
||||||
|
if(calling) root.removeChild(calling)
|
||||||
|
if(end_animation) root.removeChild(end_animation)
|
||||||
|
|
||||||
|
top_page.setAttribute('data-state', 'start')
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ロードの開始タイミングを取得
|
* ロードの開始タイミングを取得
|
||||||
* @param fn : コールバック関数
|
* @param fn : コールバック関数
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user