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