diff options
Diffstat (limited to 'animism-align/frontend/app/views/paragraph/transcript.actions.js')
| -rw-r--r-- | animism-align/frontend/app/views/paragraph/transcript.actions.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/animism-align/frontend/app/views/paragraph/transcript.actions.js b/animism-align/frontend/app/views/paragraph/transcript.actions.js index 7539343..5905cc5 100644 --- a/animism-align/frontend/app/views/paragraph/transcript.actions.js +++ b/animism-align/frontend/app/views/paragraph/transcript.actions.js @@ -36,7 +36,7 @@ export const buildParagraphs = () => dispatch => { return } // if this annotation is from a different paragraph, make a new paragraph - if (annotation.type === 'header' || annotation.paragraph_id !== currentParagraph.id) { + if (annotation.type === 'section_heading' || annotation.type === 'heading_text' || annotation.paragraph_id !== currentParagraph.id) { const paragraph_type = getParagraphType(annotation, paragraph) currentParagraph = { id: annotation.paragraph_id || ('index_' + i), @@ -45,7 +45,7 @@ export const buildParagraphs = () => dispatch => { end_ts: 0, annotations: [], } - if (annotation.type === 'header') { + if (annotation.type === 'section_heading') { currentParagraph.sectionIndex = sectionCount++ currentParagraph.id = 'section_' + currentParagraph.sectionIndex } @@ -69,7 +69,10 @@ export const buildParagraphs = () => dispatch => { } const getParagraphType = (annotation, paragraph) => { - if (annotation.type === 'header') { + if (annotation.type === 'section_heading') { + return annotation.type + } + if (annotation.type === 'heading_text') { return annotation.type } if (!paragraph) { |
