mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-04 09:28:11 +08:00
reducer
This commit is contained in:
@@ -24,7 +24,7 @@ function setToDefaultLayout(schema) {
|
||||
const LayoutChoice = (
|
||||
state = {
|
||||
available: [], // all available choices
|
||||
dotplot: true /* todo(colinmegill) #632 wire up inputs */,
|
||||
dotplot: true, // is the dotplot toggled on, or not
|
||||
current: undefined, // name of the current layout, eg, 'umap'
|
||||
currentDimNames: [], // dimension name
|
||||
},
|
||||
@@ -41,6 +41,14 @@ const LayoutChoice = (
|
||||
};
|
||||
}
|
||||
|
||||
case "toggle dotplot": {
|
||||
console.log("toggle: state, newstate", state.dotplot, !state.dotplot);
|
||||
return {
|
||||
...state,
|
||||
dotplot: !state.dotplot,
|
||||
};
|
||||
}
|
||||
|
||||
case "set layout choice": {
|
||||
const { schema } = nextSharedState.annoMatrix;
|
||||
const current = action.layoutChoice;
|
||||
|
||||
Reference in New Issue
Block a user