Class: ValueMatrix

ValueMatrix()

new ValueMatrix()

This is a wrapper class over the matrix of cells which gets created in visual group. Visual Group creates left, right, bottom and top and center matrices and wraps them using this class.
Source:

Methods

each(fn) → {ValueMatrix}

Iterates through the two dimensional matrix array and calls the given callback function with the cell instance, row index, column index and the matrix array.
Parameters:
Name Type Description
fn function Callback function which will get called for every cell.
Source:
Returns:
Instance of the value matrix.
Type
ValueMatrix

filter(…fn) → {ValueMatrix}

Sets a filter criteria. This filter criteria gets applied when each function is called.
Parameters:
Name Type Attributes Description
fn function <repeatable>
Filter function.
Source:
Returns:
Instance of value matrix.
Type
ValueMatrix

height() → {Number}

Returns the total width occupied by all the cells of the matrix.
Source:
Returns:
Width of the matrix.
Type
Number

matrix() → {Array}

Returns the array of matrices contained in this instance.
Source:
Returns:
Array of matrices.
Type
Array

width() → {Number}

Returns the total width occupied by all the cells of the matrix.
Source:
Returns:
Width of the matrix.
Type
Number

ValueMatrix(matrixArr)

new ValueMatrix(matrixArr)

Creates an instance of ValueMatrix.
Parameters:
Name Type Description
matrixArr Array Matrix array.
Source:

Methods

each(fn) → {ValueMatrix}

Iterates through the two dimensional matrix array and calls the given callback function with the cell instance, row index, column index and the matrix array.
Parameters:
Name Type Description
fn function Callback function which will get called for every cell.
Source:
Returns:
Instance of the value matrix.
Type
ValueMatrix

filter(…fn) → {ValueMatrix}

Sets a filter criteria. This filter criteria gets applied when each function is called.
Parameters:
Name Type Attributes Description
fn function <repeatable>
Filter function.
Source:
Returns:
Instance of value matrix.
Type
ValueMatrix

height() → {Number}

Returns the total width occupied by all the cells of the matrix.
Source:
Returns:
Width of the matrix.
Type
Number

matrix() → {Array}

Returns the array of matrices contained in this instance.
Source:
Returns:
Array of matrices.
Type
Array

width() → {Number}

Returns the total width occupied by all the cells of the matrix.
Source:
Returns:
Width of the matrix.
Type
Number