bags/JumpInfo. JumpInfo

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, sqopt)

JumpInfo constructor

Parameters:
NameTypeAttributesDescription
actionstring

Must be one of the described actions.

sqnumber | string<optional>

Can be the tag of the sequence element to jump to, or its
cardinal number in the list.

Members

actNum :number

Activity number in the sequence list

Type:
  • number

action :string

The current action.
Possible values are: JUMP, STOP, RETURN and EXIT.

Type:
  • string

id :string

The JumpInfo identifier

  • For regular jumps: 'forward', 'back'
  • For conditional jumps: 'upper', 'lower'
Type:
  • string

projectPath :string

Path of another JClic project to jump to

Type:
  • string

sequence :string

Current sequence tag

Type:
  • string

Methods

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:
  • The resulting object, with minimal attrributes
Type: 
object

setAttributes(data)

Loads the object settings from a data object

Parameters:
NameTypeDescription
dataobject

The data object to parse

setProperties($xml)

Loads the object settings from a specific JQuery XML element

Parameters:
NameTypeDescription
$xmlexternal:jQuery

The XML element to parse