GridHelpers

A collection of static helpers for the number grid.

Constructor

new GridHelpers()

Constructor for GridHelpers.

Classes

GridHelpers

Members

getCellId

Gets the HTML cell id for a cell given its cell number.

Example
GridHelpers.getCellId(24) # => 'cell-24';
GridHelpers.getCellId(24, 'cell-') # => 'cell-24';
GridHelpers.getCellId(24, 'cell-id-') # => 'cell-id-24';

getClampStr

Constructs a CSS clamp string for scaling a font linearly as the enclosing container resizes, setting both minimum and maximum limits.

getHighMultPair

Gets the highest possible multiple for the given multiple and number of cells.

replaceGrid

Removes all rows in given grid and adds new rows for the required no. of rows and cols.

roundToN

Rounds a number to n decimal places.

setCellIds

Sets the HTML cell id for each cell in the grid.