From 8db918da6d10ccc274e36a6e18a2b0362f086ffd Mon Sep 17 00:00:00 2001 From: "Peter A. Jonsson" Date: Tue, 20 Aug 2024 08:27:37 +0200 Subject: [PATCH] Remove unused variables (#7252) * YDYRCatalogFunctionJob: remove unused variables These look like leftovers from some earlier incarnation of the function. * ColorSchemeOptionRenderer: remove unused variables --- .../Catalog/CatalogFunctions/YDYRCatalogFunctionJob.ts | 9 --------- .../SelectableDimensions/ColorSchemeOptionRenderer.tsx | 4 ---- 2 files changed, 13 deletions(-) diff --git a/lib/Models/Catalog/CatalogFunctions/YDYRCatalogFunctionJob.ts b/lib/Models/Catalog/CatalogFunctions/YDYRCatalogFunctionJob.ts index e6c15f203f1..0b94e797386 100644 --- a/lib/Models/Catalog/CatalogFunctions/YDYRCatalogFunctionJob.ts +++ b/lib/Models/Catalog/CatalogFunctions/YDYRCatalogFunctionJob.ts @@ -245,15 +245,6 @@ export default class YDYRCatalogFunctionJob extends CatalogFunctionJobMixin( undefined ); - const regionColumnSplit = DATASETS.find( - (d) => d.title === this.parameters?.["Output Geography"] - )?.geographyName.split("_"); - let regionColumn = ""; - - if (isDefined(regionColumnSplit) && regionColumnSplit!.length === 2) { - regionColumn = `${regionColumnSplit![0]}_code_${regionColumnSplit![1]}`; - } - runInAction(() => { csvResult.setTrait(CommonStrata.user, "name", `${this.name} Results`); csvResult.setTrait( diff --git a/lib/ReactViews/SelectableDimensions/ColorSchemeOptionRenderer.tsx b/lib/ReactViews/SelectableDimensions/ColorSchemeOptionRenderer.tsx index f07d1b14688..4b58fdee00b 100644 --- a/lib/ReactViews/SelectableDimensions/ColorSchemeOptionRenderer.tsx +++ b/lib/ReactViews/SelectableDimensions/ColorSchemeOptionRenderer.tsx @@ -38,21 +38,18 @@ function ramp( let colors: string[]; /** This could be used to draw text on top of swatches/ramps */ - let dark; if ( n && (d3Scale as any)[`scheme${name}`] && (d3Scale as any)[`scheme${name}`][n] ) { colors = (d3Scale as any)[`scheme${name}`][n]; - dark = lab(colors[0]).l < 50; } else { const interpolate = (d3Scale as any)[`interpolate${name}`]; if (!interpolate) { return ; } colors = []; - dark = lab(interpolate(0)).l < 50; for (let i = 0; i < interpolateWidth; ++i) { colors.push(rgb(interpolate(i / (interpolateWidth - 1))).hex()); } @@ -111,7 +108,6 @@ function swatches(name: string | undefined) { } if (!colors) return ; const n = colors.length; - const dark = lab(colors[0]).l < 50; return (