mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-05 14:47:40 +03:00
Merge pull request #104 from ibs0d/claude/add-fit-to-screen-mode-XvHoV
Debug: add console.log to handleFitDragStop for drag coordinate inspe…
This commit is contained in:
commit
be97838a76
@ -487,6 +487,23 @@ export default function DraggableGridLayout({
|
||||
const colsPerRow = fitGridParams.colsPerRow;
|
||||
const draggedId = newItem.i;
|
||||
|
||||
console.log("[FitDrag]", {
|
||||
draggedId,
|
||||
"newItem.x": newItem.x,
|
||||
"newItem.y": newItem.y,
|
||||
w,
|
||||
colsPerRow,
|
||||
targetCol: Math.max(0, Math.min(Math.round(newItem.x / w), colsPerRow - 1)),
|
||||
targetRow: Math.max(0, Math.round(newItem.y / w)),
|
||||
sourceIndex: [...(fitLayoutOverride ?? fitLayout ?? [])]
|
||||
.sort((a, b) => (a.y !== b.y ? a.y - b.y : a.x - b.x))
|
||||
.map((item) => item.i)
|
||||
.indexOf(newItem.i),
|
||||
orderedNames: [...(fitLayoutOverride ?? fitLayout ?? [])]
|
||||
.sort((a, b) => (a.y !== b.y ? a.y - b.y : a.x - b.x))
|
||||
.map((item) => item.i),
|
||||
});
|
||||
|
||||
const currentOrder = fitLayoutOverride ?? fitLayout ?? [];
|
||||
const orderedNames = [...currentOrder]
|
||||
.sort((a, b) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user