forked from sorich87/bootstrap-tour
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Init fixed. Scroll improved. onElementUnavailable added. Progress bar…
… added Fixed flow issue with tour.init() especially where page contains hidden elements - Do not call tour.init(). Create your new Tour({options}); then call Tour.start or .restart when you want to show the tour. (sorich87#700 Fixed inefficient display of tour popover - popovers do not constantly reload current step on scroll. Flickering/flashing resolved. (sorich87#685) - element popovers don't move around the page as you scroll - this is a personal thing, but I didn't like the functionality where if you scroll the page so the element is no longer visible, the popover follows you around. Doesn't make much sense because the popover isn't visually attached to it's parent element. - orphan popovers stay stuck to the center of the screen no matter what Added onElementUnavailable(tour, step) to global and step options - Specify a function as normal (i.e.: same as onNext etc) with pattern above. Function will be called when the element of the step is unavailable == missing, hidden etc. "step" parameter indicates the step that is going to be skipped. Added progress indicators and ability to dynamically change during tour: - Global option "showProgressBar" : set to true to show a (bootstrap) progress bar, or false to hide it - Step option "showProgressBar" will override global option, so you can turn on/off progress bars per step Customise the progress bar using option getProgressBarHTML: getProgressBarHTML: function(percentProgress) { return '<div class="progress"><div class="progress-bar progress-bar-striped" role="progressbar" style="width: ' + percentProgress + '%;"></div></div>'} - Global and step option "showProgressText" shows a "N / X" tour step counter in the popover title bar Customise the text using option getProgressTextHTML: getProgressBarHTML: function(stepNumber, percentProgress, stepCount) { return '<span class="pull-right">' + stepNumber + '/' + stepCount + '</span>'; } Based on sorich87#362
- Loading branch information
1 parent
4242065
commit 38440a9
Showing
1 changed file
with
135 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38440a9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also have the issue that the tooltip keeps blinking on scrolling. (Couldn't test your changes yet, as I use the standalone bootstrap-tour file.)
Note that you made your changes currently in the generated JS file. If you want your changes to be accepted offically, you'll need to make the adjustments in
./src
: