diff options
Diffstat (limited to 'animism-align/frontend/app/views/viewer/viewer.actions.js')
| -rw-r--r-- | animism-align/frontend/app/views/viewer/viewer.actions.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/animism-align/frontend/app/views/viewer/viewer.actions.js b/animism-align/frontend/app/views/viewer/viewer.actions.js index d63ced5..3800623 100644 --- a/animism-align/frontend/app/views/viewer/viewer.actions.js +++ b/animism-align/frontend/app/views/viewer/viewer.actions.js @@ -137,15 +137,15 @@ export const loadSections = () => dispatch => { if (currentSection) { currentSection.mediaLabels = Object.keys(currentMediaLabels).sort().join(', ') currentSection.paragraphs = buildParagraphs(sectionTextAnnotationOrder, currentSection.index) - currentSection.duration = timeline.duration + currentSection.end_ts = timeline.duration } let time_to_first_fullscreen_element, initial_curtain_event // last fixes on the sections - for (let i = 0; i < sections.length - 1; i++) { + for (let i = 0; i < sections.length; i++) { currentSection = sections[i] // set the end_ts for each section (i.e. just before the next section starts) - if (currentSection.end_ts === 0) { + if (currentSection.end_ts === 0 && i < sections.length - 1) { currentSection.end_ts = sections[i+1].start_ts - 1 } // if the first fullscreen event is close to the beginning of the section, move it there @@ -206,6 +206,8 @@ const makeFullscreenEvent = (index, annotation) => { } if (annotation.settings.color) { event.color = CURTAIN_COLOR_LOOKUP[annotation.settings.color] || CURTAIN_COLOR_LOOKUP.white + } else { + event.color = CURTAIN_COLOR_LOOKUP.white } return event } @@ -351,6 +353,8 @@ export const vitrineGo = direction => dispatch => { } } +/* growl */ + export const openGrowl = message => dispatch => { dispatch({ type: types.viewer.open_growl, message }) } |
