From ef4a3e790ac57330b470a6f32761a9d59e45f509 Mon Sep 17 00:00:00 2001 From: eharkins Date: Tue, 14 Apr 2020 19:54:02 -0700 Subject: [PATCH] fix more conf interval bugs exposed by narratives --- src/actions/recomputeReduxState.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/actions/recomputeReduxState.js b/src/actions/recomputeReduxState.js index 312b7f402..c33e590e8 100644 --- a/src/actions/recomputeReduxState.js +++ b/src/actions/recomputeReduxState.js @@ -44,7 +44,6 @@ export const getMaxCalDateViaTree = (nodes) => { /* need a (better) way to keep the queryParams all in "sync" */ const modifyStateViaURLQuery = (state, query) => { - // console.log("Query incoming: ", query); if (query.l) { state["layout"] = query.l; } @@ -60,7 +59,9 @@ const modifyStateViaURLQuery = (state, query) => { if (query.c) { state["colorBy"] = query.c; } - if (query.ci !== undefined) { + if (query.ci === undefined) { + state["temporalConfidence"]["on"] = false; + } else { state["temporalConfidence"]["on"] = true; } if (query.r) { @@ -463,7 +464,9 @@ const checkAndCorrectErrorsInState = (state, metadata, query, tree, viewingNarra } /* temporalConfidence */ - if (!shouldDisplayTemporalConfidence(state.temporalConfidence.exists, state.distanceMeasure, state.layout)) { + if (shouldDisplayTemporalConfidence(state.temporalConfidence.exists, state.distanceMeasure, state.layout)) { + state.temporalConfidence.display = true; + } else { state.temporalConfidence.display = false; state.temporalConfidence.on = false; delete query.ci; // rm ci from the query if it doesn't apply