bags/ConditionalJumpInfo. ConditionalJumpInfo

This special case of JumpInfo is used in ActivitySequenceJump objects to decide
the type of jump or action to be performed, based on the results obtained by the user when
playing previous JClic activities.

In addition to the standard JumpInfo fields and methods, this class has two public
members where score and time thresholds are stored.

The exact meaning of this members will depend on the type of ConditionalJumpInfo in the
ActivitySequenceJump (it can be upperJump or lowerJump).

Constructor

new ConditionalJumpInfo(action, sqopt, thresholdopt, timeopt)

ConditionalJumpInfo 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.

thresholdnumber<optional>

Threshold above or below which the action will be triggered,
depending on the type of JumpInfo.

timenumber<optional>

Delay to be applied in automatic jumps.

Extends

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

threshold :number

Threshold above or below which the action will be triggered, depending on the type of JumpInfo.

Type:
  • number

time :number

Delay to be applied in automatic jumps.

Type:
  • number

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 this conditional jump settings from a data object

Parameters:
NameTypeDescription
dataobject

The data object to parse

setProperties($xml)

Loads this object settings from a specific JQuery XML element

Parameters:
NameTypeDescription
$xmlexternal:jQuery

The XML element to parse