From 82c2ac11f4ef2112a0332f2f9c7cdd52444f0d2a Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sat, 4 Jul 2020 17:24:21 +0200 Subject: displaying annotation list, click to select, doubleclick to show form, updating annotations --- .../frontend/views/align/containers/annotations.container.js | 8 ++------ .../frontend/views/align/containers/timeline.container.js | 3 +++ 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'animism-align/frontend/views/align/containers') diff --git a/animism-align/frontend/views/align/containers/annotations.container.js b/animism-align/frontend/views/align/containers/annotations.container.js index e32757b..b6cdace 100644 --- a/animism-align/frontend/views/align/containers/annotations.container.js +++ b/animism-align/frontend/views/align/containers/annotations.container.js @@ -11,15 +11,16 @@ import { clamp } from '../../../util' import { positionToTime } from '../align.util' import AnnotationForm from '../components/annotations/annotation.form' +import AnnotationIndex from '../components/annotations/annotation.index' class Annotations extends Component { constructor(props){ super(props) - // this.handleKeydown = this.handleKeydown.bind(this) } render() { return (
+ {this.props.annotation.start_ts && } @@ -28,11 +29,6 @@ class Annotations extends Component { } } -/* -- get the first sentence from the text -- display the form at that point -*/ - const mapStateToProps = state => ({ timeline: state.align.timeline, annotation: state.align.annotation, diff --git a/animism-align/frontend/views/align/containers/timeline.container.js b/animism-align/frontend/views/align/containers/timeline.container.js index 4167d2d..23b9435 100644 --- a/animism-align/frontend/views/align/containers/timeline.container.js +++ b/animism-align/frontend/views/align/containers/timeline.container.js @@ -53,6 +53,9 @@ class Timeline extends Component { } else { // console.log(e.keyCode) switch (e.keyCode) { + case 27: // escape + actions.align.hideAnnotationForm() + break case 32: // spacebar actions.audio.toggle() break -- cgit v1.2.3-70-g09d2