UNPKG

@antv/s2

Version:

effective spreadsheet render core lib

27 lines 682 B
import { BaseCellPool } from './base'; export class RowCellPool extends 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); } } //# sourceMappingURL=row-cell.js.map