fix: Hot fix 3D model view in right preview
This commit is contained in:
@ -44,7 +44,7 @@ export const PreviewRightWidget = observer(() => {
|
|||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<MediaViewer media={articleMedia} fullWidth />
|
<MediaViewer media={articleMedia} fullWidth fullHeight />
|
||||||
</Box>
|
</Box>
|
||||||
) : (
|
) : (
|
||||||
<Box
|
<Box
|
||||||
|
@ -24,6 +24,14 @@ export function MediaViewer({
|
|||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
className={className}
|
className={className}
|
||||||
|
sx={{
|
||||||
|
width: fullWidth ? "100%" : "auto",
|
||||||
|
height: fullHeight ? "100%" : "auto",
|
||||||
|
display: "flex",
|
||||||
|
justifyContent: "center",
|
||||||
|
alignItems: "center",
|
||||||
|
overflow: "hidden",
|
||||||
|
}}
|
||||||
width={fullWidth ? "100%" : "auto"}
|
width={fullWidth ? "100%" : "auto"}
|
||||||
height={fullHeight ? "100%" : "auto"}
|
height={fullHeight ? "100%" : "auto"}
|
||||||
>
|
>
|
||||||
@ -100,8 +108,8 @@ export function MediaViewer({
|
|||||||
fileUrl={`${import.meta.env.VITE_KRBL_MEDIA}${
|
fileUrl={`${import.meta.env.VITE_KRBL_MEDIA}${
|
||||||
media?.id
|
media?.id
|
||||||
}/download?token=${token}`}
|
}/download?token=${token}`}
|
||||||
height="100%"
|
height="500px"
|
||||||
width="1000px"
|
width="500px"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -475,21 +475,12 @@ export const CreateRightTab = observer(
|
|||||||
media_type: previewMedia.media_type,
|
media_type: previewMedia.media_type,
|
||||||
filename: previewMedia.filename || "",
|
filename: previewMedia.filename || "",
|
||||||
}}
|
}}
|
||||||
|
fullWidth
|
||||||
|
fullHeight
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{!previewMedia && (
|
|
||||||
<MediaAreaForSight
|
|
||||||
onFinishUpload={(mediaId) => {
|
|
||||||
linkPreviewMedia(mediaId);
|
|
||||||
}}
|
|
||||||
onFilesDrop={() => {}}
|
|
||||||
contextObjectName={sight[language].name}
|
|
||||||
contextType="sight"
|
|
||||||
isArticle={false}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
@ -531,7 +522,8 @@ export const CreateRightTab = observer(
|
|||||||
className=" overflow-hidden"
|
className=" overflow-hidden"
|
||||||
sx={{
|
sx={{
|
||||||
width: "100%",
|
width: "100%",
|
||||||
|
height: "100%",
|
||||||
|
overflow: "hidden",
|
||||||
background: "#877361",
|
background: "#877361",
|
||||||
borderColor: "grey.300",
|
borderColor: "grey.300",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
@ -551,7 +543,6 @@ export const CreateRightTab = observer(
|
|||||||
borderTopRightRadius: "10px",
|
borderTopRightRadius: "10px",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
height: "auto",
|
height: "auto",
|
||||||
objectFit: "contain",
|
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@ -560,6 +551,7 @@ export const CreateRightTab = observer(
|
|||||||
sight[language].right[activeArticleIndex].media[0]
|
sight[language].right[activeArticleIndex].media[0]
|
||||||
}
|
}
|
||||||
fullWidth
|
fullWidth
|
||||||
|
fullHeight
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
) : (
|
) : (
|
||||||
|
Reference in New Issue
Block a user