Skip to content

Commit

Permalink
chore: fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
neindochoh committed Oct 27, 2023
1 parent ded266b commit f0e0167
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/components/AppBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import MainWalkthrough, {
Handle as MainWalkthroughRef,
} from './walkthrough/MainWalkthrough';
import { useColors } from '../stores/colors';
import type { ColorsState } from '../stores/colors';
import ColorPaletteSelect from './ui/ColorPaletteSelect';
import { categoricalPalettes, continuousPalettes } from '../palettes';

Expand Down
4 changes: 2 additions & 2 deletions src/hooks/useColorTransferFunction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const createConstantTransferFunction = (
export const createColorTransferFunction = (
data: ColumnData | undefined,
dType: DataType | undefined,
robust: boolean = false,
robust = false,
continuousInts = false,
continuousCategories = false,
classBreaks?: number[]
Expand Down Expand Up @@ -163,7 +163,7 @@ export const useColorTransferFunction = (data: any[], dtype: DataType) => {
colors.continuousInts,
colors.continuousCategories
),
[dtype, data]
[dtype, data, colors.robust, colors.continuousInts, colors.continuousCategories]
);
};

Expand Down
5 changes: 2 additions & 3 deletions src/stores/dataset/colorTransferFunctionFactory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {
createColorTransferFunction,
TransferFunction,
} from '../../hooks/useColorTransferFunction';
import _ from 'lodash';
import { DataColumn, TableData } from '../../types';
import { useColors } from '../colors';

Expand All @@ -14,7 +13,7 @@ type ColumnsTransferFunctions = Record<
export const makeColumnsColorTransferFunctions = (
columns: DataColumn[],
data: TableData,
filteredMask: boolean[]
filteredIndices: Int32Array
): ColumnsTransferFunctions => {
const colors = useColors.getState();

Expand All @@ -28,7 +27,7 @@ export const makeColumnsColorTransferFunctions = (
colors.continuousCategories
),
filtered: createColorTransferFunction(
data[column.key].filter((_, i) => filteredMask[i]),
filteredIndices.map((i) => data[column.key][i]),
column.type,
colors.robust,
colors.continuousInts,
Expand Down
2 changes: 1 addition & 1 deletion src/stores/dataset/dataset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ export const useDataset = create(
const newTransferFunctions = makeColumnsColorTransferFunctions(
get().columns.filter(({ key }) => columnsToCompute.includes(key)),
get().columnData,
get().isIndexFiltered
get().filteredIndices
);

set({
Expand Down

0 comments on commit f0e0167

Please sign in to comment.