From 7ed7efb524e7984e8e1ca0da77a882412a748174 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 12 Oct 2020 19:43:38 +0200 Subject: comments --- .../frontend/app/views/viewer/viewer.actions.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'animism-align/frontend/app/views/viewer/viewer.actions.js') diff --git a/animism-align/frontend/app/views/viewer/viewer.actions.js b/animism-align/frontend/app/views/viewer/viewer.actions.js index b7490b5..d63ced5 100644 --- a/animism-align/frontend/app/views/viewer/viewer.actions.js +++ b/animism-align/frontend/app/views/viewer/viewer.actions.js @@ -15,7 +15,8 @@ import { buildParagraphs } from 'app/utils/transcript.utils' import { annotationFadeTimings } from 'app/utils/annotation.utils' import { getNextSection } from 'app/utils/viewer.utils' -// build the list of sections from the raw annotation list. +/* building the list of sections from the raw annotation list */ + export const loadSections = () => dispatch => { // list of all sections let sections = [] @@ -209,6 +210,8 @@ const makeFullscreenEvent = (index, annotation) => { return event } +/* nav UI */ + export const setNavStyle = color => dispatch => { dispatch({ type: types.viewer.set_nav_style, color }) } @@ -250,6 +253,13 @@ export const openTranscript = () => dispatch => { actions.viewer.toggleComponent('transcript') } +export const showCredits = () => dispatch => { + actions.viewer.closeGrowl() + actions.viewer.showComponent("credits") +} + +/* section / seeking logic */ + export const reachedEndOfSection = currentSection => dispatch => { actions.audio.pause() dispatch({ type: types.viewer.reached_end_of_section }) @@ -299,11 +309,6 @@ export const seekToBeginning = () => dispatch => { actions.viewer.seekToTimestamp(0.0) } -export const showCredits = () => dispatch => { - actions.viewer.closeGrowl() - actions.viewer.showComponent("credits") -} - export const setSectionFromTimestamp = play_ts => dispatch => { const { sections, currentSection } = store.getState().viewer const insideSection = sections.some((section, i) => { @@ -321,6 +326,8 @@ export const setSectionFromTimestamp = play_ts => dispatch => { } } +/* vitrine modal */ + export const openVitrineModal = (media, color, id) => dispatch => { console.log(media) const index = media.settings.image_order.indexOf(id) @@ -342,7 +349,6 @@ export const vitrineGo = direction => dispatch => { } else { actions.viewer.setVitrineIndex(targetIndex) } - } export const openGrowl = message => dispatch => { -- cgit v1.2.3-70-g09d2