From 9f57a7f41ac4a8d2526f2b169193010eb76023a2 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 24 Aug 2020 14:46:52 +0200 Subject: adding rest of content --- .../app/views/align/components/annotations/annotation.form.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'animism-align/frontend/app/views/align/components/annotations/annotation.form.js') diff --git a/animism-align/frontend/app/views/align/components/annotations/annotation.form.js b/animism-align/frontend/app/views/align/components/annotations/annotation.form.js index 829d3ae..f20e70a 100644 --- a/animism-align/frontend/app/views/align/components/annotations/annotation.form.js +++ b/animism-align/frontend/app/views/align/components/annotations/annotation.form.js @@ -5,7 +5,7 @@ import { connect } from 'react-redux' import actions from 'app/actions' -import { ZOOM_STEPS } from 'app/constants' +import { MEDIA_ANNOTATION_TYPES } from 'app/constants' import { clamp, timestamp, capitalize } from 'app/utils' import { timeToPosition } from 'app/utils/align.utils' import { Select } from 'app/common' @@ -87,6 +87,10 @@ class AnnotationForm extends Component { if (annotation.type === 'paragraph_end') { annotation.text = '' } + if (annotation.type in MEDIA_ANNOTATION_TYPES) { + if (!annotation.settings.media_id) return + annotation.text = '' + } if (annotation.id === 'new') { delete annotation.id actions.annotation.create(annotation) -- cgit v1.2.3-70-g09d2