mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-30 16:48:12 +08:00
[WIP] JS lint and dead code removal (#1053)
* lint and dead code removal * fix regressions
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import calcCentroid from "../util/centroid";
|
||||
|
||||
const initialState = {
|
||||
metadataField: "",
|
||||
categoryIndex: -1,
|
||||
@@ -8,7 +6,7 @@ const initialState = {
|
||||
};
|
||||
|
||||
const CentroidLabel = (state = initialState, action, sharedNextState) => {
|
||||
const { categoricalSelection, world, layoutChoice } = sharedNextState;
|
||||
const { categoricalSelection } = sharedNextState;
|
||||
const { metadataField, categoryIndex } = action;
|
||||
const categoryField =
|
||||
categoricalSelection?.[metadataField]?.categoryValues[categoryIndex];
|
||||
@@ -19,12 +17,7 @@ const CentroidLabel = (state = initialState, action, sharedNextState) => {
|
||||
metadataField,
|
||||
categoryIndex,
|
||||
categoryField,
|
||||
centroidXY: null /* calcCentroid( This function call is computationally heavy and also leading to large GC. Before reimplementation, look into optimization and memoization
|
||||
world,
|
||||
metadataField,
|
||||
categoryField,
|
||||
layoutChoice.currentDimNames
|
||||
) */
|
||||
centroidXY: null
|
||||
};
|
||||
|
||||
case "category value mouse hover end":
|
||||
|
||||
@@ -55,7 +55,7 @@ const ColorsReducer = (
|
||||
|
||||
case "annotation: delete category": {
|
||||
const { colorAccessor } = state;
|
||||
if (action.metadataField != colorAccessor) {
|
||||
if (action.metadataField !== colorAccessor) {
|
||||
return state;
|
||||
}
|
||||
/* else reset */
|
||||
|
||||
Reference in New Issue
Block a user