#31 : Wait animation finish
This commit is contained in:
@@ -228,14 +228,13 @@
|
|||||||
// Disable page change while animation is in progress
|
// Disable page change while animation is in progress
|
||||||
let disabled = false
|
let disabled = false
|
||||||
function safeChangePage(cb, options) {
|
function safeChangePage(cb, options) {
|
||||||
applyAutoplay()
|
|
||||||
const animated = get(options, 'animated', true)
|
const animated = get(options, 'animated', true)
|
||||||
if (disabled) return
|
if (disabled) return
|
||||||
cb()
|
cb()
|
||||||
disabled = true
|
disabled = true
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
disabled = false
|
disabled = false
|
||||||
|
applyAutoplay()
|
||||||
}, animated ? duration : 0)
|
}, animated ? duration : 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ export class ProgressManager {
|
|||||||
if (value > 1) {
|
if (value > 1) {
|
||||||
this.reset()
|
this.reset()
|
||||||
onFinish()
|
onFinish()
|
||||||
this.start(onFinish)
|
|
||||||
}
|
}
|
||||||
}, stepMs)
|
}, stepMs)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user