UNPKG

@antv/s2

Version:

effective spreadsheet render core lib

31 lines 819 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RowCellPool = void 0; const base_1 = require("./base"); class RowCellPool extends base_1.BaseCellPool { constructor() { super(...arguments); this.cellIdPool = new Set(); } acquire() { const cell = super.acquire(); if (cell) { this.cellIdPool.delete(cell.getMeta().id); } return cell; } release(cell) { if (cell.getRenderer()) { cell.destroy(); return; } const cellId = cell.getMeta().id; if (this.cellIdPool.has(cellId)) { return; } super.release(cell); this.cellIdPool.add(cellId); } } exports.RowCellPool = RowCellPool; //# sourceMappingURL=row-cell.js.map