diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-07-18 16:04:15 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-07-18 16:04:15 +0200 |
| commit | b7142402f8cfbbb8932a1b256fd3fb935234c4bf (patch) | |
| tree | 50fc96f39efe617e8c39e3988555085b3a24a9ed | |
| parent | 0a3d12fc8179d6d3c416b5655aa0b86eecbe91dc (diff) | |
ability to reset paragraph index
4 files changed, 8 insertions, 13 deletions
diff --git a/animism-align/frontend/views/align/align.container.js b/animism-align/frontend/views/align/align.container.js index 80d8a57..94036e1 100644 --- a/animism-align/frontend/views/align/align.container.js +++ b/animism-align/frontend/views/align/align.container.js @@ -9,14 +9,11 @@ import Timeline from './containers/timeline.container.js' import Script from './containers/script.container.js' import actions from '../../actions' import { Header } from '../../common' -// import * as uploadActions from './upload.actions' - -// import GraphIndex from './containers/graph.index' -// import GraphNew from './containers/graph.new' -// import GraphEdit from './containers/graph.edit' class Container extends Component { componentDidMount() { + document.body.scrollTo(0, 0) + document.body.parentNode.scrollTo(0, 0) } render() { return ( diff --git a/animism-align/frontend/views/align/align.css b/animism-align/frontend/views/align/align.css index 077799a..bbf3bc2 100644 --- a/animism-align/frontend/views/align/align.css +++ b/animism-align/frontend/views/align/align.css @@ -97,8 +97,7 @@ canvas { /* Script */ .script { - align-self: flex-end; - height: 100%; + height: calc(100vh - 3.15rem); z-index: 1; } 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, |
