From 3b8ca4ae366ad8925ded787f87350862ef18e0ca Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 16 Jul 2020 20:13:10 +0200 Subject: adjust annotation position without opening form --- .../frontend/views/align/components/annotations/annotation.index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'animism-align/frontend/views/align/components/annotations/annotation.index.js') 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) -- cgit v1.2.3-70-g09d2