Closed nam-hle closed 2 years ago
Totals | |
---|---|
Change from base Build 1526258228: | 0.0% |
Covered Lines: | 641 |
Relevant Lines: | 641 |
:tada: This PR is included in version 6.8.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Fix #187, #12.
API
Algorithm
Width calculation
The width of the spanning cell (SC) is the sum of all column widths, padding, border (hidden borders has been considered) that it spans.
Height calculation
The raw content of the top-left cell will be used as SC's content. After calculating the width above, we can determine the total height that needs to be used to render the cell. The table row height calculation will skip the cells that belong to SCs, except those cells are belongs to the last row of SC since we need all the remaining content of SC to be placed in them.
Spanning cell config
We will use the config of the first column of SC as the SC's config, except the padding-right will be inherited from the last column's (for better alignment). The user can also overwrite those configs on demand.
Drawing border
We also need other kinds of border characters to be placed around SC. The logic should be straightforward but many cases need to be considered.
Header
The header content and config will be transferred into spanning cell config
Validation
row
,col
,rowSpan
(min 1),colSpan
(min 1) need to be specified such as all cells inside spanning cells are also contained inside the table, and do not overlap other spanning cells.