MCPcopy Index your code
hub / github.com/apache/echarts / pointToDataOnlyHeaderFillOut

Function pointToDataOnlyHeaderFillOut

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

Source from the content-addressed store, hash-verified

574// Assume partialOut has been set to NaN outside.
575// This method may fill out[0] and out[1] in one call.
576function pointToDataOnlyHeaderFillOut(
577 ctx: CtxPointToData,
578 partialOut: (OrdinalNumber | MatrixXYLocator)[],
579 dimIdx: number,
580 dims: MatrixDimPair,
581): void {
582 const otherDimIdx = 1 - dimIdx;
583
584 if (ctx[XY[dimIdx]] === CtxPointToDataAreaType.outside) {
585 return;
586 }
587 for (dims[XY[dimIdx]].resetCellIterator(_ptdDimCellIt); _ptdDimCellIt.next();) {
588 const cell = _ptdDimCellIt.item;
589 if (isCoordInRect(ctx.point[dimIdx], cell.rect, dimIdx)
590 && isCoordInRect(ctx.point[otherDimIdx], cell.rect, otherDimIdx)
591 ) {
592 // non-leaves are also allowed to be located.
593 // If the point is in x or y dimension cell area, should check both x and y coord to
594 // determine a cell; in this way a non-leaf cell can be determined.
595 partialOut[dimIdx] = cell.ordinal;
596 partialOut[otherDimIdx] = cell.id[XY[otherDimIdx]];
597 return;
598 }
599 }
600}
601
602// Assume partialOut has been set to NaN outside.
603// This method may fill out[0] and out[1] in one call.

Callers 1

pointToDataMethod · 0.85

Calls 3

isCoordInRectFunction · 0.85
resetCellIteratorMethod · 0.80
nextMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…