ActivitySequenceJump
Extends: module:bags/JumpInfo.JumpInfo
Source: ActivitySequenceJump.js:47
This is a special case of JumpInfo, used only in ActivitySequenceElement objects.
Sequence elements can contain up to two ActivitySequenceJump objects: one to be processed
when the user clicks on the "next" button (or when the activity finishes, if in automatic mode),
and the other used with the "prev" button. ActivitySequenceJump objects define a default jump
or action to be performed, but can also have up to two ConditionalJumpInfo objects. These
define alternative jumps that are performed only when score or time are below or over a specific
threshold.
Constructor
new ActivitySequenceJump(
action: string,
sq?: number | string,
): ActivitySequenceJumpActivitySequenceJump constructor
Parameters
action(string) — Must be one of the described actions.sq(number | string, optional) — Can be the tag of the sequence element to jump to, or its
cardinal number in the list.
Instance Methods
setProperties($xml: external:jQuery)
Overrides: module:bags/JumpInfo.JumpInfo#setProperties
Loads the object settings from a specific JQuery XML element.
Parameters
$xml(external:jQuery) — The XML element to parse
getAttributes(): object
Overrides: module:bags/JumpInfo.JumpInfo#getAttributes
Gets a object with the basic attributes needed to rebuild this instance excluding functions,
parent references, constants and also attributes retaining the default value.
The resulting object is commonly usued to serialize elements in JSON format.
Returns
object
setAttributes(data: object)
Overrides: module:bags/JumpInfo.JumpInfo#setAttributes
Loads the jump settings from a data object
Parameters
data(object) — The data object to parse
resolveJump(
rating: number,
time: number,
): module:bags/JumpInfo.JumpInfo
Resolves what JumpInfo must be taken, based on a done time and average rating obtained
in activities.
Parameters
rating(number) — Average rating obtained by the user in the activities done during the
last sequence stretch.time(number) — Total time spend doing the activities.
Returns
Instance Fields
upperJump: module:bags/ConditionalJumpInfo.ConditionalJumpInfo
Optional jump to be performed when the results (score and time) are above a specific threshold.
lowerJump: module:bags/ConditionalJumpInfo.ConditionalJumpInfo
Optional jump to be performed when the results (score or time) are below a specific threshold.
id: string
Inherited from module:bags/JumpInfo.JumpInfo#id
Overrides: module:bags/JumpInfo.JumpInfo#id
The JumpInfo identifier
- For regular jumps: 'forward', 'back'
- For conditional jumps: 'upper', 'lower'
action: string
Inherited from module:bags/JumpInfo.JumpInfo#action
Overrides: module:bags/JumpInfo.JumpInfo#action
The current action.
Possible values are: JUMP, STOP, RETURN and EXIT.
actNum: number
Inherited from module:bags/JumpInfo.JumpInfo#actNum
Overrides: module:bags/JumpInfo.JumpInfo#actNum
Activity number in the sequence list
sequence: string
Inherited from module:bags/JumpInfo.JumpInfo#sequence
Overrides: module:bags/JumpInfo.JumpInfo#sequence
Current sequence tag
projectPath: string
Inherited from module:bags/JumpInfo.JumpInfo#projectPath
Overrides: module:bags/JumpInfo.JumpInfo#projectPath
Path of another JClic project to jump to