revert grid fixes

This commit is contained in:
Игорь Владимирович 2026-03-16 12:21:51 +11:00
parent 60f2e11666
commit eb5d985daa

View File

@ -359,7 +359,7 @@ export default function DraggableGridLayout({
// subtract container margin, 1 camera takes up at least 4 rows // subtract container margin, 1 camera takes up at least 4 rows
// account for additional margin on bottom of each row // account for additional margin on bottom of each row
return ( return (
((availableWidth || window.innerWidth) - 2 * marginValue) / ((availableWidth ?? window.innerWidth) - 2 * marginValue) /
12 / 12 /
aspectRatio - aspectRatio -
marginValue + marginValue +
@ -710,9 +710,9 @@ export default function DraggableGridLayout({
currentGroups={groups} currentGroups={groups}
activeGroup={group} activeGroup={group}
/> />
{containerWidth > 0 && <Responsive <Responsive
className="grid-layout" className="grid-layout"
width={availableWidth} width={availableWidth ?? window.innerWidth}
layouts={{ layouts={{
lg: currentGridLayout, lg: currentGridLayout,
md: currentGridLayout, md: currentGridLayout,
@ -887,7 +887,7 @@ export default function DraggableGridLayout({
</GridLiveContextMenu> </GridLiveContextMenu>
); );
})} })}
</Responsive>} </Responsive>
{isDesktop && ( {isDesktop && (
<div <div
className={cn( className={cn(