From a908c637718fe0d40819ba427b7480b97e243bff Mon Sep 17 00:00:00 2001 From: itoshi Date: Thu, 10 Jul 2025 11:53:00 +0300 Subject: [PATCH] fix: Hot fix 3D model view in right preview --- .../ArticlePreviewPage/PreviewRightWidget.tsx | 2 +- src/widgets/MediaViewer/index.tsx | 12 ++++++++++-- src/widgets/SightTabs/CreateRightTab/index.tsx | 18 +++++------------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/pages/Article/ArticlePreviewPage/PreviewRightWidget.tsx b/src/pages/Article/ArticlePreviewPage/PreviewRightWidget.tsx index 33403e0..d2a4daf 100644 --- a/src/pages/Article/ArticlePreviewPage/PreviewRightWidget.tsx +++ b/src/pages/Article/ArticlePreviewPage/PreviewRightWidget.tsx @@ -44,7 +44,7 @@ export const PreviewRightWidget = observer(() => { }, }} > - + ) : ( @@ -100,8 +108,8 @@ export function MediaViewer({ fileUrl={`${import.meta.env.VITE_KRBL_MEDIA}${ media?.id }/download?token=${token}`} - height="100%" - width="1000px" + height="500px" + width="500px" /> )} diff --git a/src/widgets/SightTabs/CreateRightTab/index.tsx b/src/widgets/SightTabs/CreateRightTab/index.tsx index 4d63998..bf60797 100644 --- a/src/widgets/SightTabs/CreateRightTab/index.tsx +++ b/src/widgets/SightTabs/CreateRightTab/index.tsx @@ -475,21 +475,12 @@ export const CreateRightTab = observer( media_type: previewMedia.media_type, filename: previewMedia.filename || "", }} + fullWidth + fullHeight /> )} - {!previewMedia && ( - { - linkPreviewMedia(mediaId); - }} - onFilesDrop={() => {}} - contextObjectName={sight[language].name} - contextType="sight" - isArticle={false} - /> - )} )} @@ -531,7 +522,8 @@ export const CreateRightTab = observer( className=" overflow-hidden" sx={{ width: "100%", - + height: "100%", + overflow: "hidden", background: "#877361", borderColor: "grey.300", display: "flex", @@ -551,7 +543,6 @@ export const CreateRightTab = observer( borderTopRightRadius: "10px", width: "100%", height: "auto", - objectFit: "contain", }, }} > @@ -560,6 +551,7 @@ export const CreateRightTab = observer( sight[language].right[activeArticleIndex].media[0] } fullWidth + fullHeight /> ) : (