summaryrefslogtreecommitdiff
path: root/animism-align/frontend/views/align/components/annotations/annotation.index.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-07-16 20:13:10 +0200
committerJules Laplace <julescarbon@gmail.com>2020-07-16 20:13:10 +0200
commit3b8ca4ae366ad8925ded787f87350862ef18e0ca (patch)
tree0c09f567d376f17812d148c72dec130071690c83 /animism-align/frontend/views/align/components/annotations/annotation.index.js
parentdc35755748ee05abde3f3eda585d12df732e38ae (diff)
adjust annotation position without opening form
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)