From a11010c00a205a7129a7ed8f8c4816874b10b685 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Thu, 19 Mar 2026 10:38:03 +0900 Subject: [PATCH] =?UTF-8?q?#1749=20=EB=AA=A8=EB=93=88=20=EB=B0=B0=EC=B9=98?= =?UTF-8?q?=20=ED=9B=84=20=ED=9A=8C=EB=A1=9C=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modal/circuitTrestle/CircuitTrestleSetting.jsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx b/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx index c98b75f0..fe7b8e11 100644 --- a/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx +++ b/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx @@ -149,9 +149,9 @@ export default function CircuitTrestleSetting({ id }) { return { x, y, - width: Math.floor(width), - height: Math.floor(height), - area: Math.floor(width) * Math.floor(height), + width: Math.round(width), + height: Math.round(height), + area: Math.round(width) * Math.round(height), } }) @@ -227,7 +227,7 @@ export default function CircuitTrestleSetting({ id }) { // 인접 모듈 여부 확인 const isAdjacent = (current, target) => { const gap = getGap(current, target) - return gap >= 0 && gap <= primaryInterval + 1 + return gap >= 0 && gap <= primaryInterval + 2 } // 정렬된 모듈 순회 @@ -238,7 +238,7 @@ export default function CircuitTrestleSetting({ id }) { const directTargets = findTargetModules(current, secondaryInterval) const closestTarget = getClosestTarget(directTargets) - if (closestTarget && isAdjacent(current, closestTarget) && closestTarget.area > current.area) { + if (closestTarget && isAdjacent(current, closestTarget) && closestTarget.area - current.area > 1) { return false // 검증 실패 } @@ -264,7 +264,7 @@ export default function CircuitTrestleSetting({ id }) { }) const closestHalf = getClosestTarget(findHalfTarget) - if (closestHalf && isAdjacent(current, closestHalf) && closestHalf.area > current.area) { + if (closestHalf && isAdjacent(current, closestHalf) && closestHalf.area - current.area > 1) { return false // 검증 실패 } }