From 4e2121e9160b627415a31f628fa3f00711138375 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 2 Nov 2020 16:38:13 +0100 Subject: images can include images from galleries. command to duplicate annotations --- .../paragraph/components/paragraphTypes/paragraphTypes.image.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'animism-align/frontend/app/views/paragraph') diff --git a/animism-align/frontend/app/views/paragraph/components/paragraphTypes/paragraphTypes.image.js b/animism-align/frontend/app/views/paragraph/components/paragraphTypes/paragraphTypes.image.js index 36c72e9..8aaedc9 100644 --- a/animism-align/frontend/app/views/paragraph/components/paragraphTypes/paragraphTypes.image.js +++ b/animism-align/frontend/app/views/paragraph/components/paragraphTypes/paragraphTypes.image.js @@ -6,6 +6,14 @@ export const MediaImage = ({ paragraph, media, currentParagraph, currentAnnotati const annotation = paragraph.annotations[0] const item = media.lookup[annotation.settings.media_id] if (!item) return
Media not found: {annotation.settings.media_id}
+ + let url; + if (item.type === 'gallery' && item.settings.display_lookup[annotation.settings.frame_index]) { + url = item.settings.display_lookup[annotation.settings.frame_index].url + } else { + url = item.settings.display.url + } + return (