API Docs for:
Show:

Source Class

Defined in: model\Source.js:10
Module: model

Methods

addEvent

(
  • An
)

Defined in model\Source.js:94

Adds an event involving this source.

Parameters:

  • An Object

    instance of Event

initialize

(
  • A
)

Defined in model\Source.js:19

The initialization method of this object.

Parameters:

  • A Map

    map of parameters

toString

() String

Defined in model\Source.js:79

Returns a string representing this object.

Returns:

String: A string representing this object

updateState

()

Defined in model\Source.js:50

This method updates the state of this source, it is triggered at each change of the current instant defined by Bgplay. The objective of this method is to find the current event in which the source is involved. If the current event changes then this method triggers a "curEventChange" event (pub/sub) containing the current event. If the current event is null then this method triggers a "curEventNull" event (pub/sub) containing the previous event.

validate

(
  • A
)
Array

Defined in model\Source.js:34

The validation method of this object. This method is used to check the initialization parameters.

Parameters:

  • A Map

    map of parameters

Returns:

Array: An array of {String} errors