@antv/s2
Version:
effective spreadsheet render core lib
14 lines • 659 B
JavaScript
export const getColsForGrid = (colMin, colMax, colNodes) => colNodes.slice(colMin, colMax + 1).map((item) => item.x + item.width);
export const getRowsForGrid = (rowMin, rowMax, viewCellHeights) => {
const rows = [];
for (let index = rowMin; index < rowMax + 1; index++) {
rows.push(viewCellHeights.getCellOffsetY(index + 1));
}
return rows;
};
export const getFrozenRowsForGrid = (rowMin, rowMax, startY, viewCellHeights) => {
const rows = getRowsForGrid(rowMin, rowMax, viewCellHeights);
const baseY = viewCellHeights.getCellOffsetY(rowMin);
return rows.map((r) => r - baseY + startY);
};
//# sourceMappingURL=grid.js.map