From 40fbc42b13d379e329aa37e40a38c78c315a4c9f Mon Sep 17 00:00:00 2001 From: Matt Weiden <538456+mweiden@users.noreply.github.com> Date: Thu, 30 Apr 2020 13:48:14 -0700 Subject: [PATCH] Cache crossfilter when embedding type is changed (#1439) Fixes https://github.com/chanzuckerberg/cellxgene/issues/1433 When selection is deselected the world is reset to the universe the crossfilter is reset to that in the resetCache, including the embeddings in the layout_XY dim. However, the embedding selection stays the same. If the embedding selected is not the default, the embedding shown to the user will be different than the embedding layout_XY in the crossfilter, causing lasso selections to be made against the wrong embedding coordinates --- client/src/reducers/resetCache.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/reducers/resetCache.js b/client/src/reducers/resetCache.js index 2148472d..b99e7084 100644 --- a/client/src/reducers/resetCache.js +++ b/client/src/reducers/resetCache.js @@ -14,7 +14,8 @@ const ResetCacheReducer = ( nextSharedState ) => { switch (action.type) { - case "initial data load complete (universe exists)": { + case "initial data load complete (universe exists)": + case "set layout choice": { const { crossfilter } = nextSharedState; return { ...state,