EragonJ / Trip.js

🚀 Trip.js is a plugin that can help you customize a tutorial trip easily with more flexibilities.
https://eragonj.github.io/Trip.js/
MIT License
793 stars 111 forks source link

canGoPrev: false failing #124

Closed mcicoria closed 8 years ago

mcicoria commented 8 years ago

trip.core.js:744 is

var canGoPrev = trip.canGoPrev || this.settings.canGoPrev;

If you choose to set canGoPrev to false, then this statement sets it back to the default setting of true.

This is also the case with trip.core.js:762

var canGoNext = trip.canGoNext || this.settings.canGoNext;

I'm happy to send a pull request to change them to:

 var canGoNext = trip.canGoNext;
 if(typeof canGoNext === "undefined") {
    canGoNext = this.settings.canGoNext; 
}
...

 var canGoPrev = trip.canGoPrev;
 if(typeof canGoPrev === "undefined") {
    canGoPrev = this.settings.canGoPrev; 
}
...
EragonJ commented 8 years ago

cool !! thanks @mcicoria, I didn't notice that. I would be nice to have your PR for this part, thanks !!

EragonJ commented 8 years ago

@mcicoria i'll leave this to you first, if you have any problem about making PR, please let me know ;)

EragonJ commented 8 years ago

@mcicoria i just wrote the patch for you ! thanks for the information : )