From 1f2f17b618799418a4ace6b2e2b2a064a2e85cd1 Mon Sep 17 00:00:00 2001 From: ghiscoding Date: Fri, 22 Dec 2023 22:05:48 -0500 Subject: [PATCH] chore: remove unused functions from legacy TreeColumns depth code - the legacy TreeColumns depth was removed in PR #775 but some functions were missed and should be removed, they are `getHeadersWidthL()` and `getHeadersWidthR()` --- src/slick.grid.ts | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/src/slick.grid.ts b/src/slick.grid.ts index aadbb0a0..1673c90c 100644 --- a/src/slick.grid.ts +++ b/src/slick.grid.ts @@ -1145,45 +1145,6 @@ export class SlickGrid = Column, O e return Math.max(this.headersWidth, this.viewportW) + 1000; } - protected getHeadersWidthL() { - this.headersWidthL = 0; - - this.columns.forEach((column, i) => { - if (column.hidden) { return; } - - if (!((this._options.frozenColumn!) > -1 && (i > this._options.frozenColumn!))) { - this.headersWidthL += column.width || 0; - } - }); - - if (this.hasFrozenColumns()) { - this.headersWidthL += 1000; - } else { - this.headersWidthL += this.scrollbarDimensions?.width ?? 0; - this.headersWidthL = Math.max(this.headersWidthL, this.viewportW) + 1000; - } - - return this.headersWidthL; - } - - protected getHeadersWidthR() { - this.headersWidthR = 0; - - this.columns.forEach((column, i) => { - if (column.hidden) { return; } - if ((this._options.frozenColumn!) > -1 && (i > this._options.frozenColumn!)) { - this.headersWidthR += column.width || 0; - } - }); - - if (this.hasFrozenColumns()) { - this.headersWidthR = Math.max(this.headersWidthR, this.viewportW) + this.getHeadersWidthL(); - this.headersWidthR += this.scrollbarDimensions?.width ?? 0; - } - - return this.headersWidthR; - } - /** Get the grid canvas width */ getCanvasWidth(): number { const availableWidth = this.viewportHasVScroll ? this.viewportW - (this.scrollbarDimensions?.width ?? 0) : this.viewportW;