Resizer: Show only on desktops (#3180)

This commit is contained in:
Alexander Zinchuk 2023-05-15 10:58:06 +02:00
parent a9d9392d8c
commit c16f9317f1
3 changed files with 19 additions and 27 deletions

View File

@ -339,3 +339,13 @@
background: unset;
}
}
.resize-handle {
position: absolute;
top: 0;
left: 0;
bottom: 0;
width: 0.25rem;
z-index: var(--z-resize-handle);
cursor: var(--custom-cursor, ew-resize);
}

View File

@ -208,7 +208,7 @@ function MiddleColumn({
} = getActions();
const { width: windowWidth } = useWindowSize();
const { isTablet } = useAppLayout();
const { isTablet, isDesktop } = useAppLayout();
const lang = useLang();
const [dropAreaState, setDropAreaState] = useState(DropAreaState.None);
@ -464,12 +464,14 @@ function MiddleColumn({
`}
onClick={(isTablet && isLeftColumnShown) ? handleTabletFocus : undefined}
>
<div
className="resize-handle"
onMouseDown={initResize}
onMouseUp={handleMouseUp}
onDoubleClick={resetResize}
/>
{isDesktop && (
<div
className="resize-handle"
onMouseDown={initResize}
onMouseUp={handleMouseUp}
onDoubleClick={resetResize}
/>
)}
<div
className={bgClassName}
style={customBackgroundValue ? `--custom-background: ${customBackgroundValue}` : undefined}

View File

@ -111,26 +111,6 @@ body.cursor-ew-resize {
-webkit-user-select: none !important;
}
.resize-handle {
position: fixed;
display: none;
top: 0;
left: 0;
width: 0;
height: 0;
z-index: -1;
@media (min-width: 926px) {
position: absolute;
display: block;
height: auto;
bottom: 0;
width: 0.25rem;
z-index: var(--z-resize-handle);
cursor: var(--custom-cursor, ew-resize);
}
}
.clearfix::after {
content: "";
clear: both;