(
ctx: CtxPointToData,
partialOut: (OrdinalNumber | MatrixXYLocator)[],
dimIdx: number,
dims: MatrixDimPair,
)
| 602 | // Assume partialOut has been set to NaN outside. |
| 603 | // This method may fill out[0] and out[1] in one call. |
| 604 | function pointToDataBodyCornerFillOut( |
| 605 | ctx: CtxPointToData, |
| 606 | partialOut: (OrdinalNumber | MatrixXYLocator)[], |
| 607 | dimIdx: number, |
| 608 | dims: MatrixDimPair, |
| 609 | ): void { |
| 610 | if (ctx[XY[dimIdx]] === CtxPointToDataAreaType.outside) { |
| 611 | return; |
| 612 | } |
| 613 | const dim = ctx[XY[dimIdx]] === CtxPointToDataAreaType.inCorner |
| 614 | ? dims[XY[1 - dimIdx]] : dims[XY[dimIdx]]; |
| 615 | for (dim.resetLayoutIterator(_ptdLevelIt, dimIdx); _ptdLevelIt.next();) { |
| 616 | if (isCoordInLayoutInfo(ctx.point[dimIdx], _ptdLevelIt.item)) { |
| 617 | partialOut[dimIdx] = _ptdLevelIt.item.id[XY[dimIdx]]; |
| 618 | return; |
| 619 | } |
| 620 | } |
| 621 | } |
| 622 | |
| 623 | function isCoordInLayoutInfo(coord: number, cell: MatrixCellLayoutInfo): boolean { |
| 624 | return cell.xy <= coord && coord <= cell.xy + cell.wh; |
no test coverage detected
searching dependent graphs…