browserSelectors.ts 1.5 KB
Newer Older
1
import { RootState } from 'src/rootReducer';
2 3 4 5 6
import {
  BrowserOpenState,
  BrowserNavStates,
  ChrLocation
} from './browserState';
7
import { TrackType } from './track-panel/trackPanelConfig';
8

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

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

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

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

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

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

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

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

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

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

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

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

export const getSelectedBrowserTab = (state: RootState): TrackType =>
  state.browser.selectedBrowserTab;