diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-07-27 19:42:05 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-07-27 19:42:05 +0200 |
| commit | e22cb8a789c0576738fe0965a8f4242a3d3c76af (patch) | |
| tree | 226e5ec4298f67125ac9c8953e708c84365b7879 /animism-align/frontend/app/views/align/components/annotations/annotationForms | |
| parent | a43615e0c0d4edc34a0f4a14172e559f00be298a (diff) | |
process list of paragraphs. fullscreen vs inline
Diffstat (limited to 'animism-align/frontend/app/views/align/components/annotations/annotationForms')
2 files changed, 18 insertions, 24 deletions
diff --git a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.image.js b/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.image.js index 490c822..2509970 100644 --- a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.image.js +++ b/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.image.js @@ -23,11 +23,24 @@ export const AnnotationFormImage = ({ annotation, media, handleSettingsSelect, h defaultOption='Choose an image' onChange={handleSettingsSelect} /> - <AnnotationFormFullscreen - annotation={annotation} - handleSettingsChange={handleSettingsChange} - handleSettingsSelect={handleSettingsSelect} + <Checkbox + label="Fullscreen" + name="fullscreen" + checked={annotation.settings.fullscreen} + onChange={handleSettingsSelect} + /> + <Checkbox + label="Inline" + name="inline" + checked={annotation.settings.inline} + onChange={handleSettingsSelect} /> + {(annotation.settings.fullscreen && !annotation.settings.inline) && ( + <AnnotationFormFullscreen + annotation={annotation} + handleSettingsChange={handleSettingsChange} + /> + )} </div> ) } diff --git a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.utility.js b/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.utility.js index 4abb50e..f3d25fc 100644 --- a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.utility.js +++ b/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.utility.js @@ -30,37 +30,18 @@ export const AnnotationFormCurtain = ({ annotation, handleSettingsChange, handle alwaysAccessible annotation={annotation} handleSettingsChange={handleSettingsChange} - handleSettingsSelect={handleSettingsSelect} /> </div> ) } -export const AnnotationFormFullscreen = ({ annotation, alwaysAccessible, handleSettingsChange, handleSettingsSelect }) => { - if (!alwaysAccessible && !annotation.settings.fullscreen) { - return ( - <Checkbox - label="Fullscreen" - name="fullscreen" - checked={annotation.settings.fullscreen} - onChange={handleSettingsSelect} - /> - ) - } +export const AnnotationFormFullscreen = ({ annotation, handleSettingsChange }) => { const { fadeInDuration, fadeOutDuration, duration, start_ts, end_ts, fade_in_end_ts, fade_out_start_ts, } = annotationFadeTimings(annotation) return ( <div> - {!alwaysAccessible && ( - <Checkbox - label="Fullscreen" - name="fullscreen" - checked={annotation.settings.fullscreen} - onChange={handleSettingsSelect} - /> - )} <TextInput title="Total duration" name="duration" |
