API Docs for:
Show:

Bgplay Class

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

This is the Facade of the model layer. It manages all the collections of objects of the model layer and all the parameters needed to describe the domain.

Methods

addNode

(
  • An
)

Defined in model\Bgplay.js:73

Adds a node to the model.

Parameters:

  • An Object

    instance of Node

addSource

(
  • An
)

Defined in model\Bgplay.js:82

Adds a source to the model.

Parameters:

  • An Object

    instance of Source

addTarget

(
  • An
)

Defined in model\Bgplay.js:91

Adds a target to the model.

Parameters:

  • An Object

    instance of Target

getNode

(
  • An
)
Object

Defined in model\Bgplay.js:100

Returns a node given an ID

Parameters:

  • An String

    ID of a node

Returns:

Object: The node with that ID

getSource

(
  • An
)
Object

Defined in model\Bgplay.js:110

Returns a source given an ID

Parameters:

  • An String

    ID for a source

Returns:

Object: The source with that ID

getTarget

(
  • An
)
Object

Defined in model\Bgplay.js:120

Returns a target given an ID

Parameters:

  • An String

    ID for a target

Returns:

Object: The target with that ID

setCurInstant

(
  • An
  • If
)

Defined in model\Bgplay.js:47

Set a new current instant. It is an additional level of indirection compared to the native Backbone's set method.

Parameters:

  • An Object

    instance of Instant

  • If Boolean

    true a "change" event will be triggered

updateState

()

Defined in model\Bgplay.js:63

Forces the update of the model.

validate

(
  • A
)
Array

Defined in model\Bgplay.js:141

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

Parameters:

  • A Map

    map of parameters

Returns:

Array: An array of {String} errors