Passed to ICell.render for custom cell markup.
const cell: ICell = { type: cellTypeEnum.OPEN, render({ coords, cell, gamegrid }) { const el = document.createElement("span"); el.textContent = `${cell.type} @ ${coords.join(",")}`; el.dataset.active = String(gamegrid.getState().activeCoords.join(",") === coords.join(",")); return el; },}; Copy
const cell: ICell = { type: cellTypeEnum.OPEN, render({ coords, cell, gamegrid }) { const el = document.createElement("span"); el.textContent = `${cell.type} @ ${coords.join(",")}`; el.dataset.active = String(gamegrid.getState().activeCoords.join(",") === coords.join(",")); return el; },};
Active cell focus as [x, y] (matches data-gamegrid-coords and GameGrid.getMatrix column/row order).
[x, y]
data-gamegrid-coords
Passed to ICell.render for custom cell markup.
Example