Construct a Tour by providing a configuration.
The configuration of the Tour
Optional
options: { id?: string; namespace?: string } = {}Additional options for configuring the tour
Optional
id?: stringA tour ID that supercedes TourConfig#id
Optional
namespace?: stringA tour namespace that supercedes TourConfig#namespace
Configuration of the tour. This object is cloned to avoid mutating the original configuration.
The HTMLElement that fades out the rest of the screen
The HTMLElement that blocks input while a Tour is active
The HTMLElement which is the focus of the current tour step.
Static
HIGHLIGHT_Padding around a Highlighted Element
Return whether this Tour is currently eligible to be started? This is useful for tours which can only be used in certain circumstances, like if the canvas is active.
Return the current Step, or null if the tour has not yet started.
The human-readable description of the tour.
Returns True if there is a next TourStep
Returns True if there is a previous TourStep
The unique identifier of the tour.
The key the Tour is stored under in game.tours, of the form ${namespace}.${id}
The package namespace for the tour.
The current status of the Tour
The index of the current step; -1 if the tour has not yet started, or null if the tour is finished.
The configuration of tour steps
The human-readable title for the tour.
Static
activeReturns the active Tour, if any
Static
tourIndicates if a Tour is currently in progress.
Internal
Reloads the Tour's current step from the saved progress
Advance the tour to a completed state.
Exit the tour at the current step.
Progress the Tour to the next step.
Rewind the Tour to the previous step.
Progresses to a given Step
The step to progress to
Reset the Tour to an un-started state.
Start the Tour at its current step, or at the beginning if the tour has not yet been started.
Protected
_getProtected
Query the DOM for the target element using the provided selector
A CSS selector
The target element, or null if not found
Protected
Abstract
_postProtected
Clean-up operations performed after a step is completed.
Protected
Abstract
_preProtected
Set-up operations performed before a step is shown.
Protected
_renderProtected
Renders the current Step of the Tour
Static
fromJSONCreates and returns a Tour by loading a JSON file
The path to the JSON file
Static
onHandle a movement action to either progress or regress the Tour.
The Directions being moved in
A Tour that shows a series of guided steps.