@antv/s2
Version:
effective spreadsheet render core lib
35 lines • 1.64 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AxisRowHeader = void 0;
const g_1 = require("@antv/g");
const s2_1 = require("@antv/s2");
const axis_row_cell_1 = require("../cell/axis-row-cell");
const constant_1 = require("../constant");
const frozen_1 = require("../utils/frozen");
class AxisRowHeader extends s2_1.RowHeader {
initGroups() {
this.scrollGroup = this.appendChild(new g_1.Group({
name: constant_1.KEY_GROUP_ROW_AXIS_SCROLL,
style: { zIndex: s2_1.FRONT_GROUND_GROUP_SCROLL_Z_INDEX },
}));
this.frozenGroup = this.appendChild(new g_1.Group({
name: constant_1.KEY_GROUP_ROW_AXIS_FROZEN,
style: { zIndex: s2_1.FRONT_GROUND_GROUP_FROZEN_Z_INDEX },
}));
this.frozenTrailingGroup = this.appendChild(new g_1.Group({
name: constant_1.KEY_GROUP_ROW_AXIS_FROZEN,
style: { zIndex: s2_1.FRONT_GROUND_GROUP_FROZEN_Z_INDEX },
}));
const { spreadsheet, nodes } = this.getHeaderConfig();
this.extraFrozenNodes = (0, frozen_1.getExtraFrozenRowAxisNodes)(spreadsheet.facet, nodes);
}
getCellInstance(node) {
const headerConfig = this.getHeaderConfig();
const { spreadsheet } = headerConfig;
const { axisRowCell: rowAxisCell } = spreadsheet.options;
return ((rowAxisCell === null || rowAxisCell === void 0 ? void 0 : rowAxisCell(node, spreadsheet, headerConfig)) ||
new axis_row_cell_1.AxisRowCell(node, spreadsheet, headerConfig));
}
}
exports.AxisRowHeader = AxisRowHeader;
//# sourceMappingURL=axis-row.js.map