ConditionalJumpInfo

Extends: module:bags/JumpInfo.JumpInfo

Source: ConditionalJumpInfo.js:47

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: string, sq?: number | string, threshold?: number, time?: number, ): ConditionalJumpInfo

ConditionalJumpInfo 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.
  • threshold (number, optional) — Threshold above or below which the action will be triggered,
    depending on the type of JumpInfo.
  • time (number, optional) — Delay to be applied in automatic jumps.

Instance Methods

setProperties($xml: external:jQuery)

Overrides: module:bags/JumpInfo.JumpInfo#setProperties

Loads this object settings from a specific JQuery XML element

Parameters

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

Parameters

  • data (object) — The data object to parse

Instance Fields

threshold: number

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

time: number

Delay to be applied in automatic jumps.

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