From 324136293c322eed172d3fcd9dc1471ac72cc1fd Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 3 Nov 2020 20:02:22 +0100 Subject: inline image styles --- animism-align/frontend/app/constants.js | 14 ++++++++---- .../annotationForms/annotationForm.image.js | 25 ++++++++++++++-------- .../player/components.inline/inline.image.js | 9 +++++--- 3 files changed, 32 insertions(+), 16 deletions(-) diff --git a/animism-align/frontend/app/constants.js b/animism-align/frontend/app/constants.js index db7034c..b4fb9c5 100644 --- a/animism-align/frontend/app/constants.js +++ b/animism-align/frontend/app/constants.js @@ -101,10 +101,16 @@ export const CURTAIN_COLOR_LOOKUP = CURTAIN_COLORS.reduce((a,b) => { }, {}) export const IMAGE_BACKGROUND_SIZE_OPTIONS = [ - { label: 'cover', name: 'cover' }, - { label: 'contain', name: 'contain' }, - { label: '90% width', name: '90% auto' }, - { label: '90% height', name: 'auto 90%' }, + { label: 'Cover', name: 'cover' }, + { label: 'Contain', name: 'contain' }, + { label: '90% Width', name: '90% auto' }, + { label: '90% Height', name: 'auto 90%' }, +] + +export const IMAGE_INLINE_SIZE_OPTIONS = [ + { label: 'Fullscreen', name: 'fullscreen' }, + { label: 'Wide', name: 'wide' }, + { label: 'Column width', name: 'column-width' }, ] export const DISPLAY_SIZE = 2000 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 3d52db8..3de2ac5 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 @@ -1,6 +1,6 @@ import React, { Component } from 'react' -import { CURTAIN_COLOR_SELECT_OPTIONS } from 'app/constants' +import { CURTAIN_COLOR_SELECT_OPTIONS, IMAGE_INLINE_SIZE_OPTIONS } from 'app/constants' import { Select, Checkbox, TextInput } from 'app/common' import { AnnotationFormFullscreen } from './annotationForm.utility' import { makeMediaItems, makeGalleryItems } from 'app/utils/annotation.utils' @@ -42,13 +42,6 @@ export const AnnotationFormImage = ({ annotation, media, handleSettingsSelect, h onChange={handleSettingsSelect} /> - - +