diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-07-06 19:54:33 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-07-06 19:54:33 +0200 |
| commit | beac05596a0d09e07087c326224160db6fd1e936 (patch) | |
| tree | 85dd46da1b04937b51b366c7f4437c126633ac46 /animism-align/frontend/views/align/components | |
| parent | 67db33081c3272ee75e2a3d8f08c0373e0687438 (diff) | |
set paragraph end with specific element
Diffstat (limited to 'animism-align/frontend/views/align/components')
| -rw-r--r-- | animism-align/frontend/views/align/components/annotations/annotation.form.js | 5 | ||||
| -rw-r--r-- | animism-align/frontend/views/align/components/annotations/annotation.types.js | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/animism-align/frontend/views/align/components/annotations/annotation.form.js b/animism-align/frontend/views/align/components/annotations/annotation.form.js index e18d6df..226bb45 100644 --- a/animism-align/frontend/views/align/components/annotations/annotation.form.js +++ b/animism-align/frontend/views/align/components/annotations/annotation.form.js @@ -12,7 +12,7 @@ import { timeToPosition } from '../../align.util' import { Select } from '../../../../common' const ANNOTATION_TYPES = [ - 'sentence', 'header' + 'sentence', 'header', 'paragraph_end' ].map(name => ({ name, label: name })) class AnnotationForm extends Component { @@ -68,6 +68,9 @@ class AnnotationForm extends Component { } handleSubmit() { const { annotation } = this.props + if (annotation.type === 'paragraph_end') { + annotation.text = '' + } if (annotation.id === 'new') { delete annotation.id actions.annotation.create(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 a2eae62..06be4a8 100644 --- a/animism-align/frontend/views/align/components/annotations/annotation.types.js +++ b/animism-align/frontend/views/align/components/annotations/annotation.types.js @@ -51,7 +51,6 @@ export const AnnotationParagraphEnd = ({ y, annotation, selected, onClick, onDou onClick={e => onClick(e, annotation)} onDoubleClick={e => onDoubleClick(e, annotation)} > - {text} </div> ) } |
