browserSelectors.ts 1.33 KB
Newer Older
1
import { RootState } from 'src/rootReducer';
2 3 4 5 6
import {
  BrowserOpenState,
  BrowserNavStates,
  ChrLocation
} from './browserState';
7

8 9 10
export const getBrowserActivated = (state: RootState): boolean =>
  state.browser.browserActivated;

11 12 13
export const getBrowserOpenState = (state: RootState): BrowserOpenState =>
  state.browser.browserOpenState;

14 15
export const getDrawerView = (state: RootState): string =>
  state.browser.drawerView;
16 17 18 19 20 21

export const getDrawerOpened = (state: RootState): boolean =>
  state.browser.drawerOpened;

export const getTrackPanelOpened = (state: RootState): boolean =>
  state.browser.trackPanelOpened;
22 23 24

export const getBrowserNavOpened = (state: RootState): boolean =>
  state.browser.browserNavOpened;
25 26 27

export const getBrowserNavStates = (state: RootState): BrowserNavStates =>
  state.browser.browserNavStates;
28 29 30

export const getChrLocation = (state: RootState): ChrLocation =>
  state.browser.chrLocation;
31 32 33

export const getDefaultChrLocation = (state: RootState): ChrLocation =>
  state.browser.defaultChrLocation;
34 35 36 37 38 39

export const getTrackPanelModalOpened = (state: RootState): boolean =>
  state.browser.trackPanelModalOpened;

export const getTrackPanelModalView = (state: RootState): string =>
  state.browser.trackPanelModalView;
40 41 42

export const getGenomeSelectorActive = (state: RootState): boolean =>
  state.browser.genomeSelectorActive;