(
coordValue: MatrixCoordValueOption,
dims: MatrixDimPair,
thisDimIdx: number // 0 | 1
)
| 64 | * For the y direction, it's the opposite. |
| 65 | */ |
| 66 | export function coordDataToAllCellLevelLayout( |
| 67 | coordValue: MatrixCoordValueOption, |
| 68 | dims: MatrixDimPair, |
| 69 | thisDimIdx: number // 0 | 1 |
| 70 | ): MatrixCellLayoutInfo | NullUndefined { |
| 71 | // Find in body. |
| 72 | let result: MatrixCellLayoutInfo | NullUndefined = dims[XY[thisDimIdx]].getCell(coordValue); |
| 73 | // Find in corner or dimension area. |
| 74 | if (!result && isNumber(coordValue) && coordValue < 0) { |
| 75 | result = dims[XY[1 - thisDimIdx]].getUnitLayoutInfo(thisDimIdx, Math.round(coordValue)); |
| 76 | } |
| 77 | return result; |
| 78 | } |
| 79 | |
| 80 | export function resetXYLocatorRange(out: unknown[] | NullUndefined): MatrixXYLocatorRange { |
| 81 | const rg = (out || []) as MatrixXYLocatorRange; |
no test coverage detected
searching dependent graphs…