summaryrefslogtreecommitdiff
path: root/animism-align/frontend/views/align/components
diff options
context:
space:
mode:
Diffstat (limited to 'animism-align/frontend/views/align/components')
-rw-r--r--animism-align/frontend/views/align/components/annotations/annotation.index.js9
-rw-r--r--animism-align/frontend/views/align/components/annotations/annotationTypes/index.js2
2 files changed, 5 insertions, 6 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 4c3631f..30dc7c0 100644
--- a/animism-align/frontend/views/align/components/annotations/annotation.index.js
+++ b/animism-align/frontend/views/align/components/annotations/annotation.index.js
@@ -45,17 +45,16 @@ class AnnotationIndex extends Component {
e.stopPropagation()
if (e.shiftKey) {
e.preventDefault()
- this.handleParagraphSelection(annotation)
+ this.handleParagraphSelection(annotation, e.metaKey)
}
actions.audio.seek(annotation.start_ts)
actions.align.setSelectedAnnotation(annotation)
}
- handleParagraphSelection(annotation) {
+ handleParagraphSelection(annotation, shouldClear) {
const { selected_paragraph_id } = this.props.timeline
- if (!selected_paragraph_id || selected_paragraph_id === -1) {
- if (annotation.paragraph_id) {
+ if (!selected_paragraph_id || selected_paragraph_id === -1 || shouldClear) {
+ if (annotation.paragraph_id && !shouldClear) {
actions.align.setSelectedParagraph(annotation.paragraph_id)
- return
} else {
actions.paragraph.create({
type: 'paragraph',
diff --git a/animism-align/frontend/views/align/components/annotations/annotationTypes/index.js b/animism-align/frontend/views/align/components/annotations/annotationTypes/index.js
index 3a2fae1..560063b 100644
--- a/animism-align/frontend/views/align/components/annotations/annotationTypes/index.js
+++ b/animism-align/frontend/views/align/components/annotations/annotationTypes/index.js
@@ -1,4 +1,4 @@
-import React from 'React'
+import React from 'react'
import {
AnnotationSentence, AnnotationHeader,