summaryrefslogtreecommitdiff
path: root/animism-align/frontend/views/align/components/annotations/annotation.index.js
diff options
context:
space:
mode:
Diffstat (limited to 'animism-align/frontend/views/align/components/annotations/annotation.index.js')
-rw-r--r--animism-align/frontend/views/align/components/annotations/annotation.index.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/animism-align/frontend/views/align/components/annotations/annotation.index.js b/animism-align/frontend/views/align/components/annotations/annotation.index.js
index dae64df..b055d60 100644
--- a/animism-align/frontend/views/align/components/annotations/annotation.index.js
+++ b/animism-align/frontend/views/align/components/annotations/annotation.index.js
@@ -48,18 +48,19 @@ class AnnotationIndex extends Component {
this.handleParagraphSelection(annotation)
}
actions.audio.seek(annotation.start_ts)
- actions.align.setSelectedAnnotation(annotation.id)
+ actions.align.setSelectedAnnotation(annotation)
}
handleParagraphSelection(annotation) {
const { selected_paragraph_id } = this.props.timeline
if (!selected_paragraph_id || selected_paragraph_id === -1) {
if (annotation.paragraph_id) {
actions.align.setSelectedParagraph(annotation.paragraph_id)
+ return
} else {
actions.paragraph.create({
type: 'paragraph',
start_ts: annotation.start_ts,
- }) .then(data => {
+ }).then(data => {
actions.align.setSelectedParagraph(data.res.id)
annotation.paragraph_id = data.res.id
actions.annotation.update(annotation)