new Tutorial(config, nameopt, delegateopt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
config |
TutorialConfiguration | The configuration for this tutorial | |
name |
string |
<optional> |
Name of the tutorial |
delegate |
ChariotDelegate |
<optional> |
An optional delegate that responds to lifecycle callbacks |
- Source:
Methods
end(forcedopt) → {undefined}
Ends the tutorial by tearing down all the steps (and associated tooltips,
overlays).
Also marks itself as inactive.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
forced |
boolean |
<optional> |
false | Indicates whether tutorial was forced to end |
- Source:
Returns:
- Type
- undefined
getStep() → {Step}
Retrieves the Step object at index.
- Source:
Returns:
step
- Type
- Step
isActive()
Indicates if this tutorial is currently active.
return {boolean}
- Source:
next(stepopt) → {undefined}
Advances to the next step in the tutorial, or ends tutorial if no more
steps.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
step |
integer | Step |
<optional> |
If step is an integer, advances to that step. If step is a Step instance, that step If no argument is passed in, the current step's index is incremented to determine the next step. |
- Source:
Returns:
- Type
- undefined
prepare() → {undefined}
Prepares each step of the tutorial, to speedup rendering.
- Source:
Returns:
- Type
- undefined
start() → {Promise}
Starts the tutorial and marks itself as inactive.
- Source:
Returns:
- Type
- Promise
stepNum(step) → {integer}
Returns the one-indexed (read: human-friendly) step number.
Parameters:
Name | Type | Description |
---|---|---|
step |
Step | The step instance for which we want the index |
- Source:
Returns:
stepNum - The onde-indexed step number
- Type
- integer
tearDown() → {undefined}
Tears down the internal overlay, each individual step, and the navigation
handler
Nulls out internal references.
- Source:
Returns:
- Type
- undefined