diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-07-16 20:13:10 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-07-16 20:13:10 +0200 |
| commit | 3b8ca4ae366ad8925ded787f87350862ef18e0ca (patch) | |
| tree | 0c09f567d376f17812d148c72dec130071690c83 /animism-align/frontend/views/align/components | |
| parent | dc35755748ee05abde3f3eda585d12df732e38ae (diff) | |
adjust annotation position without opening form
Diffstat (limited to 'animism-align/frontend/views/align/components')
| -rw-r--r-- | animism-align/frontend/views/align/components/annotations/annotation.index.js | 5 | ||||
| -rw-r--r-- | animism-align/frontend/views/align/components/annotations/annotation.types.js | 6 |
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 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) diff --git a/animism-align/frontend/views/align/components/annotations/annotation.types.js b/animism-align/frontend/views/align/components/annotations/annotation.types.js index 309e42e..55cc3e7 100644 --- a/animism-align/frontend/views/align/components/annotations/annotation.types.js +++ b/animism-align/frontend/views/align/components/annotations/annotation.types.js @@ -20,9 +20,8 @@ export const AnnotationSentence = ({ y, annotation, selected, onClick, onDoubleC style={{ top: y }} onClick={e => onClick(e, annotation)} onDoubleClick={e => onDoubleClick(e, annotation)} - > - {text} - </div> + dangerouslySetInnerHTML={{ __html: text }} + /> ) } @@ -58,7 +57,6 @@ export const AnnotationParagraphEnd = ({ y, annotation, selected, onClick, onDou export const AnnotationVideo = ({ y, annotation, media, selected, onClick, onDoubleClick }) => { const { start_ts, text } = annotation const className = selected ? 'annotation media video selected' : 'annotation media video' - console.log(media) if (!media) { return ( <div |
