mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-04 07:28:12 +08:00
refactor categorical controls state (#1549)
* refactor categorical controls state * lint * fix race condition in tests * fix typo * add missing update on subset * remove obsolete code * update jest and puppeteer major version; update all minors * update when label changes * remove lint from tests; increase timeouts in e2e tests * changes in response to PR review * lint * more PR comment changes * more PR comment fixes * lint * more PR comment resolutions
This commit is contained in:
@@ -26,14 +26,7 @@ const centroidLabels = (state = initialState, action, sharedNextState) => {
|
||||
...state,
|
||||
labels:
|
||||
!!colorAccessor && showLabels && !!categoricalSelection[colorAccessor]
|
||||
? calcCentroid(
|
||||
world.obsAnnotations,
|
||||
world.obsLayout,
|
||||
colorAccessor,
|
||||
layoutChoice.currentDimNames,
|
||||
categoricalSelection,
|
||||
world.schema.annotations.obsByName
|
||||
)
|
||||
? calcCentroid(world, colorAccessor, layoutChoice.currentDimNames)
|
||||
: [],
|
||||
};
|
||||
|
||||
@@ -52,12 +45,9 @@ const centroidLabels = (state = initialState, action, sharedNextState) => {
|
||||
return {
|
||||
...state,
|
||||
labels: calcCentroid(
|
||||
world.obsAnnotations,
|
||||
world.obsLayout,
|
||||
world,
|
||||
colorAccessor,
|
||||
layoutChoice.currentDimNames,
|
||||
categoricalSelection,
|
||||
world.schema.annotations.obsByName
|
||||
layoutChoice.currentDimNames
|
||||
),
|
||||
showLabels,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user