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

Function layOutDimCellsRestInfoByUnit

src/coord/matrix/Matrix.ts:405–421  ·  view source on GitHub ↗
(dimIdx: number, dims: MatrixDimPair)

Source from the content-addressed store, hash-verified

403}
404
405function 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
423function layOutBodyCornerCellMerge(bodyOrCorner: MatrixBodyCorner<MatrixBodyOrCornerKind>, dims: MatrixDimPair) {
424 bodyOrCorner.travelExistingCells(cell => {

Callers 1

_resizeMethod · 0.85

Calls 3

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…