added delay

This commit is contained in:
Mike Sutton 2021-10-01 21:30:35 +02:00
parent 3fcb819881
commit 31317a355b
3 changed files with 3 additions and 2 deletions

View File

@ -7,7 +7,7 @@ Walter.tours = {};
Walter.incompleteTours = [];
Walter.startTour = function(tourName) {
if (!Shepherd.activeTour) {
Walter.tours[tourName].start();
setTimeout(function(){Walter.tours[tourName].start()}, 300);
}
};
Walter.startNextIncompleteTour = function() {

View File

@ -25,6 +25,7 @@ module WalterHelper
locals: { tour_name: key,
tour_completed: tour_keys_completed.include?(key),
trigger: tours[key]["trigger"],
tour_delay: tours[key]['delay']||500,
steps: tours[key]["steps"] }))
end
tour_html.html_safe

View File

@ -65,7 +65,7 @@
<% end %>
if (tourMayStart) {
start();
setTimeout(function(){start();}, <%= tour_delay %>); // need to delay this
}
}
}(Walter.tours["<%= tour_name %>"].start)