Skip to content

Commit

Permalink
feat: use isFinished in previous/nextStep + reset isFinished when sta…
Browse files Browse the repository at this point in the history
…rting the tour
  • Loading branch information
Outpox committed Mar 12, 2018
1 parent bba1ed6 commit b70c371
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/VTour.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,15 @@ export default {
start () {
// Wait for the DOM to be loaded, then start the tour
setTimeout(() => {
this.isFinished = false
this.currentStep = 0
}, this.mergedConfig.startTimeout)
},
previousStep () {
if (this.currentStep > this.minStep) this.currentStep--
if (this.currentStep > this.minStep && !this.isFinished) this.currentStep--
},
nextStep () {
if (this.currentStep < this.maxStep) this.currentStep++
if (this.currentStep < this.maxStep && !this.isFinished) this.currentStep++
},
stop () {
this.currentStep = -1
Expand Down

0 comments on commit b70c371

Please sign in to comment.