Class: AxesController

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

AxesController

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

Constructor

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

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
AxesController

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:

$saveButton :Node

jQuery object containing the download scree plot buttonSee also the private method _downloadScreePlot

Type:
  • Node
Source:

$table :Node

The display table where information about currently visible axes isshown.

Type:
  • Node
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:

svg :Node

The SVG node where the scree plot lives. For use with D3.

Type:
  • Node
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

buildDisplayTable()

Create a table to display the visible axis information.

Note that when this method is executed the table is destroyed, if it exists, and recreated with the appropriate information.

Source:

flipAxis(index)

Callback to change the orientation of an axis

Parameters:
Name Type Description
index Integer

The index of the dimension to re-orient, note that if this index is not visible, this callback will take no effect.

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:

getAxesColor()

Get the axes color from the UI picker.

Source:

getBackgroundColor()

Get the background color from the UI picker.

Source:

getOtherEdgeColor()

Get the other edge color from the UI picker.

Source:

getReferenceEdgeColor()

Get the reference edge color from the UI picker.

Source:

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, note that the body will take whatever space is available after considering the size of the header. The header shouldn't have height variable objects, once added their height shouldn't really change.

Parameters:
Name Type Description
width Float

the container width.

height Float

the container height.

Inherited From:
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:

setAxesColor(color)

Set the axes color (to the UI and the underlying models).

Parameters:
Name Type Description
color string

The color to set, in a CSS 6-digit hex format i.e. #ff0000 for red

Source:

setBackgroundColor(color)

Set the background color (to the UI and the underlying models).

Parameters:
Name Type Description
color string

The color to set, in a CSS 6-digit hex format i.e. #ff0000 for red

Source:

setEnabled(trulse)

Sets whether or not elements in the tab can be modified.

Parameters:
Name Type Description
trulse Boolean

option to enable elements.

Inherited From:
Source:

setOtherEdgeColor(color)

Set the other edge color (to the UI and the underlying models).

Parameters:
Name Type Description
color string

The color to set, in a CSS 6-digit hex format i.e. #ff0000 for red

Source:

setReferenceEdgeColor(color)

Set the reference edge color (to the UI and the underlying models).

Parameters:
Name Type Description
color string

The color to set, in a CSS 6-digit hex format i.e. #ff0000 for red

Source:

toJSON() → {Object}

Converts the current instance into a JSON string.

Overrides:
Source:
Returns:

JSON ready representation of self.

Type
Object

updateVisibleAxes(index, position)

Callback to reposition an axis

Parameters:
Name Type Description
index Integer

The index of the dimension to set as a new visible axis, in the corresponding position indicated by position.

position Integer

The position where the new axis will be set.

Source: