Shared: MediaViewer: Lock viewer in LTR besides top panel

This commit is contained in:
Aleksandr Lushkin 2024-07-15 16:40:18 +02:00
parent 1c37431e5e
commit 4518c501b4
4 changed files with 7 additions and 2 deletions

View File

@ -88,6 +88,7 @@ export const StyledButtonScroll = styled.div<StyledButtonScrollProps>`
`;
export const StyledMobileDetails = styled.div`
direction: ${({ theme }) => theme.interfaceDirection};
z-index: 307;
position: fixed;
top: 0;
@ -112,6 +113,8 @@ export const StyledMobileDetails = styled.div`
position: fixed;
inset-inline-start: 21px;
top: 22px;
${({ theme }) =>
theme.interfaceDirection === "rtl" && "transform: scaleX(-1);"};
}
.mobile-context {
@ -205,6 +208,7 @@ export const StyledViewerContainer = styled.div<StyledViewerContainerProps>`
position: fixed;
top: 13px;
inset-inline-end: 12px;
${({ theme }) => (theme.interfaceDirection === "rtl" ? `left` : ``)}
height: 17px;
&:hover {
background-color: transparent;

View File

@ -27,6 +27,7 @@
import styled from "styled-components";
export const DesktopDetailsContainer = styled.div`
direction: ${({ theme }) => theme.interfaceDirection};
padding-top: 21px;
height: 64px;
width: 100%;

View File

@ -229,7 +229,7 @@ export const Viewer = (props: ViewerProps) => {
playlistFile.fileExst === ".tiff" || playlistFile.fileExst === ".tif";
return (
<StyledViewerContainer visible={visible}>
<StyledViewerContainer dir="ltr" visible={visible}>
{!isFullscreen && !isMobile && panelVisible && !isPdf && (
<DesktopDetails
title={title}

View File

@ -99,7 +99,7 @@ const ViewerWrapper = memo(
directionY="top"
withBackdrop={false}
isDefaultMode={false}
directionX={isRtl ? "left" : "right"}
directionX="right"
manualY={`${bottom ?? 63}px`}
manualX={`${right ?? -31}px`}
>