Skip to content

Type Editor


Type Editor / @type-editor/tables / tablemap/compute-map / computeMap

Function: computeMap()

ts
function computeMap(table): TableMap;

Defined in: tables/src/tablemap/compute-map.ts:41

Compute a table map for the given table node.

The map is a flat array where each element represents a cell in the grid. The value at each position is the table-relative offset of the cell that covers that grid position. Cells with colspan/rowspan will appear multiple times in the array.

Parameters

ParameterTypeDescription
tableNode_2The table node to compute the map for

Returns

TableMap

A TableMap describing the table structure

Throws

If the provided node is not a table