Trevixal API
    Preparing search index...

    Class TableMap

    A table laid out on its grid, as HTML lays out colspan and rowspan: each row's cells take the first columns that no cell spanning down from a row above already covers.

    A row's cells alone cannot say which columns they stand in once a cell above spans down into the row, so everything that reasons about columns (commands, exports, serializers) reads them from here. Tables are immutable, so a map is built once per table node and kept.

    Nothing is assumed about the table being well formed. A span that runs past the last row stops there, a short row leaves holes (positions no cell covers), and where two cells overlap the first one placed keeps the spot.

    Index
    cells: readonly TableMapCell[]

    Every cell, in document order.

    height: number

    Rows in the grid, the table's rows.

    width: number

    Columns in the grid.

    • The cell covering a grid position, or null for a hole or a position off the grid.

      Parameters

      • row: number
      • column: number

      Returns TableMapCell | null

    • The cell at a row and index in the document, or null.

      Parameters

      • row: number
      • index: number

      Returns TableMapCell | null

    • The rectangle grown until no cell overlapping it sticks out of it: what a merge has to take in, since part of a cell cannot be merged.

      Parameters

      Returns TableRect