summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/paragraph/transcript.actions.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-07-27 19:21:55 +0200
committerJules Laplace <julescarbon@gmail.com>2020-07-27 19:21:55 +0200
commita43615e0c0d4edc34a0f4a14172e559f00be298a (patch)
tree663659aff8b9e221947594bcbd988dd5f55b8b0f /animism-align/frontend/app/views/paragraph/transcript.actions.js
parent268f4784b4dc24829ecea74913af301237b98fb4 (diff)
break out fullscreen form. refactor heading
Diffstat (limited to 'animism-align/frontend/app/views/paragraph/transcript.actions.js')
-rw-r--r--animism-align/frontend/app/views/paragraph/transcript.actions.js9
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) {