diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-07-27 17:44:28 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-07-27 17:44:28 +0200 |
| commit | 268f4784b4dc24829ecea74913af301237b98fb4 (patch) | |
| tree | d839758124a451952abde225734ecd3e41ee898b /animism-align/frontend/app/views/paragraph/transcript.actions.js | |
| parent | bab55fb2b208e978ff52459f643cad53f01af08e (diff) | |
adjusting z-indexes
Diffstat (limited to 'animism-align/frontend/app/views/paragraph/transcript.actions.js')
| -rw-r--r-- | animism-align/frontend/app/views/paragraph/transcript.actions.js | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/animism-align/frontend/app/views/paragraph/transcript.actions.js b/animism-align/frontend/app/views/paragraph/transcript.actions.js index 3d2b045..7539343 100644 --- a/animism-align/frontend/app/views/paragraph/transcript.actions.js +++ b/animism-align/frontend/app/views/paragraph/transcript.actions.js @@ -1,6 +1,10 @@ import * as types from 'app/types' import { store, history, dispatch } from 'app/store' -import { MEDIA_TYPES } from 'app/constants' +import { + TEXT_ANNOTATION_TYPES, + MEDIA_ANNOTATION_TYPES, + UTILITY_ANNOTATION_TYPES, +} from 'app/constants' export const buildParagraphs = () => dispatch => { const state = store.getState() @@ -13,15 +17,22 @@ export const buildParagraphs = () => dispatch => { annotationOrder.forEach((annotation_id, i) => { const annotation = annotationLookup[annotation_id] const paragraph = paragraphLookup[annotation.paragraph_id] - // if this annotation is media, insert it after the current paragraph - if (MEDIA_TYPES.has(annotation.type)) { - paragraphs.push({ - id: ('index_' + i), - type: annotation.type, - start_ts: annotation.start_ts, - end_ts: 0, - annotations: [annotation], - }) + // if this annotation is a utility (curtain, gallery instructions), then skip it + if (UTILITY_ANNOTATION_TYPES.has(annotation.type)) { + return + } + // if this annotation is media, then insert it after the current paragraph + if (MEDIA_ANNOTATION_TYPES.has(annotation.type)) { + // add option to hide the citation from the transcript + if (!annotation.settings.hideCitation) { + paragraphs.push({ + id: ('index_' + i), + type: annotation.type, + start_ts: annotation.start_ts, + end_ts: 0, + annotations: [annotation], + }) + } return } // if this annotation is from a different paragraph, make a new paragraph |
