);
}
@@ -35,13 +37,15 @@ export function InlineImage({contentElementId, configuration}) {
return (
)
}
}
function OrientationAwareInlineImage({landscapeImageFile, portraitImageFile,
- contentElementId, configuration}) {
+ contentElementId, contentElementWidth,
+ configuration}) {
const portraitOrientation = usePortraitOrientation();
const imageFile = portraitOrientation && portraitImageFile ?
portraitImageFile : landscapeImageFile;
@@ -49,14 +53,16 @@ function OrientationAwareInlineImage({landscapeImageFile, portraitImageFile,
return (
);
}
-function ImageWithCaption({imageFile, contentElementId, configuration}) {
+function ImageWithCaption({imageFile, contentElementId, contentElementWidth, configuration}) {
const {shouldLoad} = useContentElementLifecycle();
- const {enableFullscreen, position} = configuration;
- const supportFullscreen = enableFullscreen && position !== "full";
+ const {enableFullscreen} = configuration;
+ const supportFullscreen = enableFullscreen &&
+ contentElementWidth < contentElementWidths.full;
return (
diff --git a/entry_types/scrolled/package/src/contentElements/vrImage/VrImage.js b/entry_types/scrolled/package/src/contentElements/vrImage/VrImage.js
index 6b8de7b63..d24f8208d 100644
--- a/entry_types/scrolled/package/src/contentElements/vrImage/VrImage.js
+++ b/entry_types/scrolled/package/src/contentElements/vrImage/VrImage.js
@@ -2,16 +2,17 @@ import React, {useRef, useState} from 'react';
import {useAutoCruising} from './useAutoCruising';
import {
+ contentElementWidths,
useContentElementEditorState,
useContentElementLifecycle,
useFile,
ContentElementBox,
ContentElementFigure,
Panorama,
- FitViewport
+ FitViewport,
} from 'pageflow-scrolled/frontend';
-export function VrImage({configuration}) {
+export function VrImage({configuration, contentElementWidth}) {
const {shouldLoad} = useContentElementLifecycle();
const {isEditable, isSelected} = useContentElementEditorState();
@@ -20,7 +21,7 @@ export function VrImage({configuration}) {
return (
+ aspectRatio={contentElementWidth === contentElementWidths.full ? 0.5 : 0.75}>