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.
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. |
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. |
Returns:
Instance of value matrix.
- Type
- ValueMatrix
height() → {Number}
Returns the total width occupied by all the cells of the matrix.
Returns:
Width of the matrix.
- Type
- Number
matrix() → {Array}
Returns the array of matrices contained in this instance.
Returns:
Array of matrices.
- Type
- Array
width() → {Number}
Returns the total width occupied by all the cells of the matrix.
Returns:
Width of the matrix.
- Type
- Number