diff options
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" |
