mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-26 01:18:12 +08:00
latent bug in color toggle (#701)
This commit is contained in:
@@ -57,7 +57,7 @@ const ColorsReducer = (
|
||||
/* toggle between this mode and reset */
|
||||
const colorMode = action.type !== state.colorMode ? action.type : null;
|
||||
const colorAccessor =
|
||||
action.colorAccessor !== state.colorAccessor
|
||||
action.colorAccessor !== state.colorAccessor && colorMode !== null
|
||||
? action.colorAccessor
|
||||
: null;
|
||||
|
||||
@@ -77,7 +77,9 @@ const ColorsReducer = (
|
||||
/* toggle between this mode and reset */
|
||||
const colorMode = action.type !== state.colorMode ? action.type : null;
|
||||
const colorAccessor =
|
||||
action.gene !== state.colorAccessor ? action.gene : null;
|
||||
action.gene !== state.colorAccessor && coorMode !== null
|
||||
? action.gene
|
||||
: null;
|
||||
|
||||
const { rgb, scale } = createColors(world, colorMode, colorAccessor);
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user