Checks the grid configuration and calculates various parameters based on the number of rows, columns, and active elements.
The options for checking the grid.
The number of rows in the grid.
The number of columns in the grid.
The number of active elements in the grid.
A promise that resolves to a tuple containing:
removeAltGrid
numtoadd
numRows
numCols
remainingVideos
actualRows
lastrowcols
If an error occurs, it logs the error to the console.
const options = { rows: 3, cols: 4, actives: 10,};const result = await checkGridService.checkGrid(options);console.log(result);// Output could be: [false, 2, 3, 4, 2, 3, 2] Copy
const options = { rows: 3, cols: 4, actives: 10,};const result = await checkGridService.checkGrid(options);console.log(result);// Output could be: [false, 2, 3, 4, 2, 3, 2]
Checks the grid configuration and calculates various parameters based on the number of rows, columns, and active elements.
Param: options
The options for checking the grid.
Param: options.rows
The number of rows in the grid.
Param: options.cols
The number of columns in the grid.
Param: options.actives
The number of active elements in the grid.
Returns
A promise that resolves to a tuple containing:
removeAltGrid
(boolean): Indicates whether to remove the alternate grid.numtoadd
(number): The number of elements to add.numRows
(number): The number of rows.numCols
(number): The number of columns.remainingVideos
(number): The number of remaining videos.actualRows
(number): The actual number of rows.lastrowcols
(number): The number of columns in the last row.If an error occurs, it logs the error to the console.
Example