new Router(options) → {Object}
Exercises Router Class
Parameters:
Name | Type | Argument | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Router options
Properties
|
- Source:
- mathex/res-otto/js/mathex.js, line 509
Returns:
A Router instance
- Type
- Object
Methods
-
addSteps(s)
Adds steps
-
Parameters:
Name Type Description s
Array steps - Source:
- mathex/res-otto/js/mathex.js, line 531
Returns:
void -
allSteps()
Executes all the steps in succession. Debugging purposes.
-
- Source:
- mathex/res-otto/js/mathex.js, line 594
Returns:
void -
endStep(callback)
Ends the execution of a step
-
Parameters:
Name Type Argument Description callback
Number <optional>
A callback function to call if it was the last step - Source:
- mathex/res-otto/js/mathex.js, line 577
Returns:
void -
getCurrent() → {Number}
Gets the current step index
-
- Source:
- mathex/res-otto/js/mathex.js, line 550
Returns:
The current step index- Type
- Number
-
getSteps() → {Array}
Gets the steps
-
- Source:
- mathex/res-otto/js/mathex.js, line 541
Returns:
The steps- Type
- Array
-
init(s)
Initializes a Router instance
-
Parameters:
Name Type Description s
Array The exercise's steps - Source:
- mathex/res-otto/js/mathex.js, line 514
Returns:
void -
startStep(index)
Starts the execution of a step
-
Parameters:
Name Type Argument Default Description index
Number <optional>
0 The index of the step to be executed, default 0 - Source:
- mathex/res-otto/js/mathex.js, line 559