(dimIdx: number, dims: MatrixDimPair)
| 403 | } |
| 404 | |
| 405 | function layOutDimCellsRestInfoByUnit(dimIdx: number, dims: MatrixDimPair): void { |
| 406 | // Finally save layout info based on the unit leaves and levels. |
| 407 | for (const it = dims[XY[dimIdx]].resetCellIterator(); it.next();) { |
| 408 | const dimCell = it.item; |
| 409 | layOutRectOneDimBasedOnUnit(dimCell.rect, dimIdx, dimCell.id, dimCell.span, dims); |
| 410 | // Consider level varitation on tree leaves, should extend the size to touch matrix body |
| 411 | // to avoid weird appearance. |
| 412 | layOutRectOneDimBasedOnUnit(dimCell.rect, 1 - dimIdx, dimCell.id, dimCell.span, dims); |
| 413 | |
| 414 | if (dimCell.type === MatrixCellLayoutInfoType.nonLeaf) { |
| 415 | // `xy` and `wh` need to be saved in non-leaf since it supports locating by non-leaf |
| 416 | // in `dataToPoint` or `dataToLayout`. |
| 417 | dimCell.xy = dimCell.rect[XY[dimIdx]]; |
| 418 | dimCell.wh = dimCell.rect[WH[dimIdx]]; |
| 419 | } |
| 420 | } |
| 421 | } |
| 422 | |
| 423 | function layOutBodyCornerCellMerge(bodyOrCorner: MatrixBodyCorner<MatrixBodyOrCornerKind>, dims: MatrixDimPair) { |
| 424 | bodyOrCorner.travelExistingCells(cell => { |
no test coverage detected
searching dependent graphs…