mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-12 14:15:22 +03:00
add existing x value
This commit is contained in:
parent
68a9c6e657
commit
28e3af3c7d
@ -321,7 +321,10 @@ export default function DraggableGridLayout({
|
||||
const heightDiff = layoutItem.h - oldLayoutItem.h;
|
||||
const widthDiff = layoutItem.w - oldLayoutItem.w;
|
||||
const changeCoef = oldLayoutItem.w / oldLayoutItem.h;
|
||||
if (Math.abs(heightDiff) != Math.abs(widthDiff) || layoutItem.w == 12) {
|
||||
if (
|
||||
Math.abs(heightDiff) < Math.abs(widthDiff) ||
|
||||
layoutItem.x + layoutItem.w >= 12
|
||||
) {
|
||||
layoutItem.h = layoutItem.w / changeCoef;
|
||||
placeholder.h = layoutItem.w / changeCoef;
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user