JumpInfo
Source: JumpInfo.js:49
This class contains information about what things JClic sequence manager has to do in certain
circumstances, such as:
- an activity finishes
- the user clicks on the "next" or "prev" buttons
- the user clicks or a cell with special "active content"
Different kinds of actions are possible for each of these events:
- RETURN: to go back to a previous point in the sequence.
- EXIT: to exit the program (thus navigating to another URL)
- STOP: to do nothing.
- JUMP: to jump to a specific point in the sequence of activities, or to another JClic project.
Constructor
new JumpInfo(action: string, sq?: number | string): JumpInfoJumpInfo 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)
Loads the object settings from a specific JQuery XML element
Parameters
$xml(external:jQuery) — The XML element to parse
getAttributes(): object
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)
Loads the object settings from a data object
Parameters
data(object) — The data object to parse
Instance Fields
id: string
The JumpInfo identifier
- For regular jumps: 'forward', 'back'
- For conditional jumps: 'upper', 'lower'
action: string
The current action.
Possible values are: JUMP, STOP, RETURN and EXIT.
actNum: number
Activity number in the sequence list
sequence: string
Current sequence tag
projectPath: string
Path of another JClic project to jump to