From b2bd91b8b045f291ae062e042f63ea4d3f54a819 Mon Sep 17 00:00:00 2001 From: taeyma41 Date: Fri, 21 Apr 2023 11:43:35 +0200 Subject: [PATCH] fix: typo fix --- examples/demo-app/src/app.js | 4 ++-- src/components/common/color-legend.js | 4 ++-- src/constants/default-settings.js | 6 +++--- src/layers/base-layer.js | 4 ++-- src/layers/float-bitmap-layer/float-bitmap-layer.js | 2 +- src/utils/table-utils/kepler-table.js | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/demo-app/src/app.js b/examples/demo-app/src/app.js index 780aba0fc4..8528eecaa0 100644 --- a/examples/demo-app/src/app.js +++ b/examples/demo-app/src/app.js @@ -308,7 +308,7 @@ class App extends Component { // name: 'value', // type: 'real' // }, - // colorScale: 'treshold' + // colorScale: 'threshold' // } // } // ] @@ -436,7 +436,7 @@ class App extends Component { }, visualChannels: { colorField: {name: 'newState', type: 'integer'}, - colorScale: 'treshold' + colorScale: 'threshold' } } ] diff --git a/src/components/common/color-legend.js b/src/components/common/color-legend.js index 7edeb40f72..11a4404c41 100644 --- a/src/components/common/color-legend.js +++ b/src/components/common/color-legend.js @@ -148,13 +148,13 @@ export default class ColorLegend extends Component { } const scaleFunction = SCALE_FUNC[scaleType]; - // color scale can only be quantize, quantile, treshold or ordinal + // color scale can only be quantize, quantile, threshold or ordinal // @ts-ignore fix d3 scale let scale = scaleFunction() .domain(domain) .range(range.colors); - if (scaleType === SCALE_TYPES.treshold && range.ranges) { + if (scaleType === SCALE_TYPES.threshold && range.ranges) { // @ts-ignore fix d3 scale scale = scaleFunction() .domain(range.ranges) diff --git a/src/constants/default-settings.js b/src/constants/default-settings.js index 760a15f6fd..88572f75c6 100644 --- a/src/constants/default-settings.js +++ b/src/constants/default-settings.js @@ -309,7 +309,7 @@ export const SCALE_TYPES = keyMirror({ // ordinal domain to linear range point: null, - treshold: null + threshold: null }); export const SCALE_FUNC = { @@ -320,7 +320,7 @@ export const SCALE_FUNC = { [SCALE_TYPES.sqrt]: scaleSqrt, [SCALE_TYPES.log]: scaleLog, [SCALE_TYPES.point]: scalePoint, - [SCALE_TYPES.treshold]: scaleThreshold + [SCALE_TYPES.threshold]: scaleThreshold }; export const ALL_FIELD_TYPES = keyMirror({ @@ -453,7 +453,7 @@ export const AGGREGATION_TYPES = { }; export const linearFieldScaleFunctions = { - [CHANNEL_SCALES.color]: [SCALE_TYPES.quantize, SCALE_TYPES.quantile, SCALE_TYPES.treshold], + [CHANNEL_SCALES.color]: [SCALE_TYPES.quantize, SCALE_TYPES.quantile, SCALE_TYPES.threshold], [CHANNEL_SCALES.radius]: [SCALE_TYPES.sqrt], [CHANNEL_SCALES.size]: [SCALE_TYPES.linear, SCALE_TYPES.sqrt, SCALE_TYPES.log] }; diff --git a/src/layers/base-layer.js b/src/layers/base-layer.js index 1763f9d069..905e46d384 100644 --- a/src/layers/base-layer.js +++ b/src/layers/base-layer.js @@ -736,9 +736,9 @@ class Layer { return scale; } - if (colorScale === 'treshold') { + if (colorScale === 'threshold') { return this.getVisChannelScale( - 'treshold', + 'threshold', colorRange.ranges ? colorRange.ranges : colorDomain, colorRange.colors.map(hexToRgb) ); diff --git a/src/layers/float-bitmap-layer/float-bitmap-layer.js b/src/layers/float-bitmap-layer/float-bitmap-layer.js index c5aeeebd1a..5ceb91afc8 100644 --- a/src/layers/float-bitmap-layer/float-bitmap-layer.js +++ b/src/layers/float-bitmap-layer/float-bitmap-layer.js @@ -51,7 +51,7 @@ export default class FloatBitmapLayer extends Layer { getDefaultLayerConfig(props = {}) { return { ...super.getDefaultLayerConfig(props), - colorScale: 'treshold' + colorScale: 'threshold' }; } diff --git a/src/utils/table-utils/kepler-table.js b/src/utils/table-utils/kepler-table.js index 6e5e31925a..77724526e5 100644 --- a/src/utils/table-utils/kepler-table.js +++ b/src/utils/table-utils/kepler-table.js @@ -329,7 +329,7 @@ class KeplerTable { return getOrdinalDomain(dataContainer, valueAccessor); case SCALE_TYPES.quantile: - case SCALE_TYPES.treshold: + case SCALE_TYPES.threshold: return getQuantileDomain(filteredIndexForDomain, indexValueAccessor, sortFunction); case SCALE_TYPES.log: