mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-05 22:57:40 +03:00
Merge pull request #55 from ibs0d/claude/remove-grid-spacing-E0vKX
Remove grid spacing between cards and from edges
This commit is contained in:
commit
8b7e6abe6a
@ -371,16 +371,8 @@ export default function DraggableGridLayout({
|
|||||||
|
|
||||||
const cellHeight = useMemo(() => {
|
const cellHeight = useMemo(() => {
|
||||||
const aspectRatio = 16 / 9;
|
const aspectRatio = 16 / 9;
|
||||||
// subtract container margin, 1 camera takes up at least 4 rows
|
return availableWidth / 12 / aspectRatio;
|
||||||
// account for additional margin on bottom of each row
|
}, [availableWidth]);
|
||||||
return (
|
|
||||||
(availableWidth - 2 * marginValue) /
|
|
||||||
12 /
|
|
||||||
aspectRatio -
|
|
||||||
marginValue +
|
|
||||||
marginValue / 4
|
|
||||||
);
|
|
||||||
}, [availableWidth, marginValue]);
|
|
||||||
|
|
||||||
const handleResize = (
|
const handleResize = (
|
||||||
_layout: Layout,
|
_layout: Layout,
|
||||||
@ -716,7 +708,7 @@ export default function DraggableGridLayout({
|
|||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div
|
<div
|
||||||
className="no-scrollbar my-2 select-none overflow-x-hidden px-2 pb-8"
|
className="no-scrollbar select-none overflow-x-hidden"
|
||||||
ref={gridContainerRef}
|
ref={gridContainerRef}
|
||||||
>
|
>
|
||||||
<EditGroupDialog
|
<EditGroupDialog
|
||||||
@ -738,8 +730,8 @@ export default function DraggableGridLayout({
|
|||||||
rowHeight={cellHeight}
|
rowHeight={cellHeight}
|
||||||
breakpoints={{ lg: 1200, md: 996, sm: 768, xs: 480, xxs: 0 }}
|
breakpoints={{ lg: 1200, md: 996, sm: 768, xs: 480, xxs: 0 }}
|
||||||
cols={{ lg: 12, md: 12, sm: 12, xs: 12, xxs: 12 }}
|
cols={{ lg: 12, md: 12, sm: 12, xs: 12, xxs: 12 }}
|
||||||
margin={[marginValue, marginValue]}
|
margin={[0, 0]}
|
||||||
containerPadding={[0, isEditMode ? 6 : 3]}
|
containerPadding={[0, 0]}
|
||||||
resizeConfig={{
|
resizeConfig={{
|
||||||
enabled: isEditMode,
|
enabled: isEditMode,
|
||||||
handles: isEditMode ? ["sw", "nw", "se", "ne"] : [],
|
handles: isEditMode ? ["sw", "nw", "se", "ne"] : [],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user