Class: AnimationsController

AnimationsController(uiState, container, decompViewDict) → {AnimationsController}

AnimationsController

Controls the axes that are displayed on screen as well as their orientation.

Constructor

new AnimationsController(uiState, container, decompViewDict) → {AnimationsController}

Parameters:
Name Type Description
uiState UIState

The shared state

container Node

Container node to create the controller in.

decompViewDict Object

This is object is keyed by unique identifiers and the values are DecompositionView objects referring to a set of objects presented on screen. This dictionary will usually be shared by all the tabs in the application. This argument is passed by reference.

Source:
Returns:
Type
AnimationsController

Extends

Members

$body :Node

jQuery element for the body, which contains the lowermost elementsdisplayed in tab. This goes below the header.

Type:
  • Node
Inherited From:
Source:

$canvas :Node

jQuery element for the canvas, which contains the header and the body.

Type:
  • Node
Inherited From:
Source:

$container :Node

jQuery element for the parent container.

Type:
  • Node
Inherited From:
Source:

$header :Node

jQuery element for the header which contains the uppermost elementsdisplayed in a tab.

Type:
  • Node
Inherited From:
Source:

active :Boolean

Indicates whether the tab is front most

Type:
  • Boolean
Inherited From:
Default Value:
  • false
Source:

decompViewDict :Object

This is object is keyed by unique identifiers and the values areDecompositionView objects referring to a set of objects presented onscreen. This dictionary will usually be shared by all the tabs in theapplication. This argument is passed by reference.

Type:
  • Object
Inherited From:
Source:

description :String

Human-readable description of the tab.

Type:
  • String
Inherited From:
Source:

enabled :Boolean

Indicates if tab can be accessed.

Type:
  • Boolean
Inherited From:
Default Value:
  • true
Source:

identifier :String

Unique hash identifier for the tab instance.

Type:
  • String
Inherited From:
Default Value:
  • "EMPtab-xxxxxxx"
Source:

ready :function

Callback to execute when all the elements in the UI for this controllerhave been loaded. Note, that this functionality needs to be implementedby subclasses, as EmperorViewController does not have any UI components.

Type:
  • function
Inherited From:
Source:

title :String

Human-readable title of the tab.

Type:
  • String
Inherited From:
Source:

UIState :UIState

The shared state

Type:
  • UIState
Inherited From:
Source:

Methods

drawFrame()

Update the portion of the trajectory that needs to be drawn.

If the animation is not playing (because it was paused or it has finished) or a director hasn't been instantiated, no action is taken. Otherwise, trajectories are updated on screen.

Source:

forceRefresh()

Writes the current settings to the active decomposition view(s). Will be called when the decomposition view is swapped out for a different view type.

Inherited From:
Source:

fromJSON(Parsed)

Decodes JSON string and modifies its own instance variables accordingly.

Parameters:
Name Type Description
Parsed Object

JSON string representation of self.

Overrides:
Source:

getColors() → {Object}

Get the colors for the trajectories

Source:
Returns:

Returns the object mapping trajectories to colors.

Type
Object

getGradientCategory() → {String}

Getter for the gradient category

Represents how samples are ordered in each trajectory.

Source:
Returns:

The name of the gradient category in the menu.

Type
String

getRadius() → {Float}

Getter for the radius of the traces in the animation.

Source:
Returns:

Radius of the traces in the animation

Type
Float

getSpeed() → {Float}

Getter for the speed of the animation.

Source:
Returns:

Speed at which the animation is played.

Type
Float

getTrajectoryCategory() → {String}

Getter for the trajectory category

Represents how samples are grouped together.

Source:
Returns:

The name of the trajectory category in the menu.

Type
String

getView()

Retrieve a view from the controller.

This class does not operate on single decomposition views, hence this method retrieves the first available view.

Inherited From:
Source:

hasMetadataField(m) → {Bool}

Check if a metadata field is present

Parameters:
Name Type Description
m String

Metadata column to check if is present.

Inherited From:
Source:
Returns:

Whether or not the metadata field is present.

Type
Bool

resize(width, height)

Resizes the container and the individual elements.

Note, the consumer of this class, likely the main controller should call the resize function any time a resizing event happens.

Parameters:
Name Type Description
width Float

the container width.

height Float

the container height.

Overrides:
Source:

setActive(trulse)

Sets whether or not the tab is visible.

Parameters:
Name Type Description
trulse Boolean

option to activate tab (i.e. move tab to foreground).

Inherited From:
Source:

setColors(colors)

Set the colors of the trajectories

Parameters:
Name Type Description
colors Object

Mapping between trajectories and colors.

Source:

setEnabled(trulse)

Sets whether or not the tab can be modified or accessed.

Parameters:
Name Type Description
trulse Boolean

option to enable tab.

Overrides:
Source:

setGradientCategory(category)

Setter for the gradient category

Represents how samples are ordered in each trajectory.

Parameters:
Name Type Description
category String

The name of the category to set in the menu.

Source:

setRadius(radius)

Setter for the radius of the animation.

Parameters:
Name Type Description
radius Float

Radius of the traces in the animations.

Source:
Throws:

If the radius value is lesser than or equal to 0 or greater than 10.

Type
Error

setSpeed(speed)

Setter for the speed of the animation.

Parameters:
Name Type Description
speed Float

Speed at which the animation is played.

Source:
Throws:

If the radius value is lesser than or equal to 0 or greater than 10.

Type
Error

setTrajectoryCategory(category)

Setter for the trajectory category

Represents how samples are grouped together.

Parameters:
Name Type Description
category String

The name of the category to set in the menu.

Source:

toJSON() → {Object}

Converts the current instance into a JSON string.

Overrides:
Source:
Returns:

JSON ready representation of self.

Type
Object