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

Boolean options can not be True globally but False locally #171

Closed 71FIL closed 7 years ago

71FIL commented 7 years ago

The following syntax prevents the showNavigation to be set to True globally but False locally as True always wins:

  var showNavigation = o.showNavigation || this.settings.showNavigation;

In my opinion the local option should win if it is defined, thus the following change:

  var showNavigation = typeof o.showNavigation !== 'undefined' ?
                       o.showNavigation :
                       this.settings.showNavigation;

Other Boolean options are similarly affected (e.g. showCloseBox).

EragonJ commented 7 years ago

nice catch @71FIL, I noticed that somewhere too, can you help this part ? that would be a good first bug i think :)