diff options
Diffstat (limited to 'animism-align/frontend/views/align/components/annotations')
| -rw-r--r-- | animism-align/frontend/views/align/components/annotations/annotation.index.js | 8 |
1 files changed, 7 insertions, 1 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 9117a80..8121d1d 100644 --- a/animism-align/frontend/views/align/components/annotations/annotation.index.js +++ b/animism-align/frontend/views/align/components/annotations/annotation.index.js @@ -42,14 +42,16 @@ class AnnotationIndex extends Component { this.setState({ items }) } handleClick(e, annotation) { + e.stopPropagation() actions.audio.seek(annotation.start_ts) actions.align.setSelectedAnnotation(annotation.id) } handleDoubleClick(e, annotation) { + e.stopPropagation() actions.align.showEditAnnotationForm(annotation) } render() { - const { timeline } = this.props + const { timeline, annotationInForm } = this.props const { start_ts, zoom, selected_annotation_id } = timeline const { items } = this.state const className = (zoom < 2) @@ -60,6 +62,9 @@ class AnnotationIndex extends Component { return ( <div className={className}> {items.map(annotation => { + if (annotationInForm && annotation.id === annotationInForm.id) { + return null + } const { id, type, start_ts } = annotation const AnnotationElement = AnnotationElementLookup[type] const y = timeToPosition(start_ts, timeline) @@ -81,6 +86,7 @@ class AnnotationIndex extends Component { const mapStateToProps = state => ({ timeline: state.align.timeline, + annotationInForm: state.align.annotation, index: state.annotation.index, }) |
