MCPcopy
hub / github.com/apache/echarts / pointToDataBodyCornerFillOut

Function pointToDataBodyCornerFillOut

src/coord/matrix/Matrix.ts:604–621  ·  view source on GitHub ↗
(
    ctx: CtxPointToData,
    partialOut: (OrdinalNumber | MatrixXYLocator)[],
    dimIdx: number,
    dims: MatrixDimPair,
)

Source from the content-addressed store, hash-verified

602// Assume partialOut has been set to NaN outside.
603// This method may fill out[0] and out[1] in one call.
604function 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
623function isCoordInLayoutInfo(coord: number, cell: MatrixCellLayoutInfo): boolean {
624 return cell.xy <= coord && coord <= cell.xy + cell.wh;

Callers 1

pointToDataMethod · 0.85

Calls 3

isCoordInLayoutInfoFunction · 0.85
resetLayoutIteratorMethod · 0.80
nextMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…