diff --git a/src/reducers/controls.ts b/src/reducers/controls.ts index 6682271a0..943b59e7a 100644 --- a/src/reducers/controls.ts +++ b/src/reducers/controls.ts @@ -13,6 +13,7 @@ import { doesColorByHaveConfidence } from "../actions/recomputeReduxState"; import { hasMultipleGridPanels } from "../actions/panelDisplay"; export interface BasicControlsState { + defaults: Defaults panelsAvailable: string[] panelsToDisplay: string[] showTreeToo: boolean @@ -36,11 +37,24 @@ export interface MeasurementsControlState { export interface ControlsState extends BasicControlsState, MeasurementsControlState {} +interface Defaults { + distanceMeasure: string + layout: string + geoResolution: string + filters: Record + filtersInFooter: any[] + colorBy: string + selectedBranchLabel: string + tipLabelKey: typeof strainSymbol + showTransmissionLines: boolean + sidebarOpen?: boolean +} + /* defaultState is a fn so that we can re-create it at any time, e.g. if we want to revert things (e.g. on dataset change) */ export const getDefaultControlsState = () => { - const defaults: Partial = { + const defaults: Defaults = { distanceMeasure: defaultDistanceMeasure, layout: defaultLayout, geoResolution: defaultGeoResolution,