diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-10-02 15:40:13 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-10-02 15:40:13 +0200 |
| commit | 2aa9ed562116225b155f8dec5616cf06c82ac446 (patch) | |
| tree | 2ec15d2b3c7a3899cffbf12264791fdebe1778b1 /animism-align/frontend/app/views/viewer/viewer.actions.js | |
| parent | c05f49f1cd5683b868c82e453a76aec185bcbe01 (diff) | |
convoluted forms of UI click logic
Diffstat (limited to 'animism-align/frontend/app/views/viewer/viewer.actions.js')
| -rw-r--r-- | animism-align/frontend/app/views/viewer/viewer.actions.js | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/animism-align/frontend/app/views/viewer/viewer.actions.js b/animism-align/frontend/app/views/viewer/viewer.actions.js index 5fb2e8f..b7490b5 100644 --- a/animism-align/frontend/app/views/viewer/viewer.actions.js +++ b/animism-align/frontend/app/views/viewer/viewer.actions.js @@ -225,6 +225,18 @@ export const hideComponent = key => dispatch => { dispatch({ type: types.viewer.toggle_component, key, value: false }) } +export const showNavComponent = key => dispatch => { + dispatch({ type: types.viewer.toggle_nav_component, key, value: true }) +} + +export const hideNavComponent = key => dispatch => { + dispatch({ type: types.viewer.toggle_nav_component, key, value: false }) +} + +export const toggleNavComponent = key => dispatch => { + dispatch({ type: types.viewer.toggle_nav_component, key, value: !store.getState().viewer[key] }) +} + export const toggleComponent = key => dispatch => { const state = store.getState().viewer if (key !== "share" && state.share) { @@ -234,8 +246,7 @@ export const toggleComponent = key => dispatch => { } export const openTranscript = () => dispatch => { - actions.viewer.hideComponent('checklist') - actions.viewer.hideComponent('share') + actions.viewer.hideNavComponent('share') actions.viewer.toggleComponent('transcript') } |
