summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/viewer/viewer.actions.js
diff options
context:
space:
mode:
Diffstat (limited to 'animism-align/frontend/app/views/viewer/viewer.actions.js')
-rw-r--r--animism-align/frontend/app/views/viewer/viewer.actions.js13
1 files changed, 10 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 cd4b79f..2ac4665 100644
--- a/animism-align/frontend/app/views/viewer/viewer.actions.js
+++ b/animism-align/frontend/app/views/viewer/viewer.actions.js
@@ -132,7 +132,7 @@ export const loadSections = () => dispatch => {
// build timeline of fullscreen events
if ((FULLSCREEN_UTILITY_ANNOTATION_TYPES.has(annotation.type) || annotation.settings.fullscreen) && !annotation.settings.inline) {
- const event = makeFullscreenEvent(eventIndex++, annotation)
+ const event = makeFullscreenEvent(eventIndex++, annotation, currentSection)
currentSection.fullscreenTimeline.push(event)
// for videos, we probably want to show a poster image
if ((annotation.type === 'image' || annotation.type === 'video') && !annotation.settings.hide_poster_inline) {
@@ -188,7 +188,7 @@ export const loadSections = () => dispatch => {
fade_out_duration: '0:01',
duration: '0:01.1',
}
- })
+ }, currentSection)
//
currentSection.fullscreenTimeline.unshift(initial_curtain_event)
}
@@ -215,7 +215,7 @@ const newSection = (annotation, index, mediaIndex) => ({
section_nav_color: annotation.settings.section_nav_color || 'white',
})
-export const makeFullscreenEvent = (index, annotation) => {
+export const makeFullscreenEvent = (index, annotation, currentSection) => {
const timing = annotationFadeTimings(annotation)
const event = {
...timing,
@@ -231,6 +231,13 @@ export const makeFullscreenEvent = (index, annotation) => {
} else {
event.color = CURTAIN_COLOR_LOOKUP.white
}
+ if (annotation.type === 'curtain' && annotation.settings.curtain_style === 'section_heading') {
+ event.section = {
+ title: currentSection.title,
+ index: currentSection.index,
+ }
+ console.log(event.section)
+ }
return event
}