JSDoc: Class: DecompositionView

# Class: DecompositionView

## DecompositionView

DecompositionView

Contains all the information on how the model is being presented to the user.

## Constructor

#### new DecompositionView(decomp) → {DecompositionView}

##### Parameters:

Name | Type | Description
--- | --- | ---
`decomp` | DecompositionModel | a DecompositionModel object that will be represented on screen.

Source:
  - view.js, line 21

##### Returns:

Type
  DecompositionView

### Members

#### axesColor :integer

Axes color.

##### Type:

- integer

Default Value:
  - 0xFFFFFF (white)
Source:
  - view.js, line 48

#### backgroundColor :integer

Background color.

##### Type:

- integer

Default Value:
  - 0x000000 (black)
Source:
  - view.js, line 54

#### count :integer

Number of samples represented in the view.

##### Type:

- integer

Source:
  - view.js, line 31

#### decomp :DecompositionModel

The decomposition model that the view represents.

##### Type:

- DecompositionModel

Source:
  - view.js, line 26

#### lines :Array.<THREE.Line>

Array of line objects shown on screen (used for procustes and vector plots).

##### Type:

- Array.<THREE.Line>

Source:
  - view.js, line 70

#### markers :Array.<THREE.Mesh>

Array of THREE.Mesh objects on screen (represent samples).

##### Type:

- Array.<THREE.Mesh>

Source:
  - view.js, line 64

#### needsUpdate :boolean

True when changes have occured that require re-rendering of the canvas

##### Type:

- boolean

Source:
  - view.js, line 79

#### tubes :Array.<THREE.Mesh>

Tube objects on screen (used for animations)

##### Type:

- Array.<THREE.Mesh>

Source:
  - view.js, line 59

#### visibleCount :integer

Number of visible samples.

##### Type:

- integer

Source:
  - view.js, line 36

#### visibleDimensions :Array.<integer>

Top visible dimensions

##### Type:

- Array.<integer>

Default Value:
  - [0, 1, 2]
Source:
  - view.js, line 42

### Methods

#### changeVisibleDimensions(newDims)

Change the visible coordinates

##### Parameters:

Name | Type | Description
--- | --- | ---
`newDims` | Array.<integer> | An Array of integers in which each integer is the index to the principal coordinate to show

Source:
  - view.js, line 127

#### flipVisibleDimension(index)

Reorient one of the visible dimensions.

##### Parameters:

Name | Type | Description
--- | --- | ---
`index` | integer | The index of the dimension to re-orient, if this dimension is not visible i.e. not in `this.visibleDimensions`, then the method will return right away.

Source:
  - view.js, line 155

#### setCategory(attributes, setPlottableAttributes, category) → {Array.<object>}

Change the plottables attributes based on the metadata category using the provided setPlottableAttributes function

##### Parameters:

Name | Type | Description
--- | --- | ---
`attributes` | object | Key:value pairs of elements and values to change in plottables.
`setPlottableAttributes` | function | Helper function to change the values of plottables, in general this should be implemented in the controller but it can be nullable if not needed. setPlottableAttributes should receive: the scope where the plottables exist, the value to be applied to the plottables and the plotables to change. For more info see ColorViewController.setPlottableAttribute
`category` | string | The category/column in the mapping file

Source:
  - view.js, line 194
See:
  - ColorViewController.setPlottableAttribute

##### Returns:

Array of objects to be consumed by Slick grid.

Type
  Array.<object>

#### setGroupColor(color, group)

Change the color for a set of plottables.

##### Parameters:

Name | Type | Description
--- | --- | ---
`color` | integer | An RGB color in hexadecimal format.
`group` | Array.<Plottable> | Array of Plottables that will change in color.

Source:
  - view.js, line 227