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, 11 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 5d10f2a..2771957 100644
--- a/animism-align/frontend/app/views/viewer/viewer.actions.js
+++ b/animism-align/frontend/app/views/viewer/viewer.actions.js
@@ -6,7 +6,9 @@ import {
TEXT_ANNOTATION_TYPES,
INLINE_UTILITY_ANNOTATION_TYPES,
FULLSCREEN_UTILITY_ANNOTATION_TYPES,
- CURTAIN_COLOR_LOOKUP, GROWL,
+ GALLERY_UTILITY_ANNOTATION_TYPES,
+ CURTAIN_COLOR_LOOKUP,
+ GROWL,
} from 'app/constants'
import { floatInRange } from 'app/utils'
import { buildParagraphs } from 'app/utils/transcript.utils'
@@ -89,7 +91,7 @@ export const loadSections = () => dispatch => {
if (!media.settings.hide_in_bibliography && !(media.id in seenMedia)) {
currentSection.media.push({
start_ts: annotation.start_ts,
- media
+ media,
})
seenMedia[media.id] = true
}
@@ -109,6 +111,13 @@ export const loadSections = () => dispatch => {
}
}
+ // build timeline of gallery / carousel advance instructions
+ if (GALLERY_UTILITY_ANNOTATION_TYPES.has(annotation.type) && currentSection.fullscreenTimeline.length) {
+ const lastTimelineEvent = currentSection.fullscreenTimeline[currentSection.fullscreenTimeline.length - 1]
+ if (!lastTimelineEvent.timeline) lastTimelineEvent.timeline = []
+ lastTimelineEvent.timeline.push(annotation)
+ }
+
// build timeline of special inline items
if (INLINE_UTILITY_ANNOTATION_TYPES.has(annotation.type)) {
sectionTextAnnotationOrder.push(annotation.id)