From 24ae965d7cd2cfb0875829898b746d630d6ac00b Mon Sep 17 00:00:00 2001 From: ysCha Date: Tue, 16 Dec 2025 18:49:30 +0900 Subject: [PATCH] s --- src/util/skeleton-utils.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/util/skeleton-utils.js b/src/util/skeleton-utils.js index baa5d5c4..ca4eb76d 100644 --- a/src/util/skeleton-utils.js +++ b/src/util/skeleton-utils.js @@ -159,7 +159,7 @@ const movingLineFromSkeleton = (roofId, canvas) => { // console.log("3333linePosition:::::", result.position); const position = movePosition //result.position; - const absMove = Big(moveUpDown).times(1).div(10); + const moveUpDownLength = Big(moveUpDown).times(1).div(10); const modifiedStartPoints = []; // oldPoints를 복사해서 새로운 points 배열 생성 let newPoints = oldPoints.map(point => ({...point})); @@ -226,19 +226,19 @@ const movingLineFromSkeleton = (roofId, canvas) => { */ // 원본 라인 업데이트 // newPoints 배열에서 일치하는 포인트들을 찾아서 업데이트 - console.log('absMove::', absMove); + console.log('absMove::', moveUpDownLength); newPoints.forEach((point, index) => { if(position === 'bottom'){ if (moveDirection === 'in') { if(isSamePoint(roof.basePoints[index], originalStartPoint) || isSamePoint(roof.basePoints[index], originalEndPoint)) { - point.y = Big(point.y).minus(absMove).toNumber(); + point.y = Big(point.y).minus(moveUpDownLength).toNumber(); } // if (isSamePoint(roof.basePoints[index], originalEndPoint)) { // point.y = Big(point.y).minus(absMove).toNumber(); // } }else if (moveDirection === 'out'){ if(isSamePoint(roof.basePoints[index], originalStartPoint) || isSamePoint(roof.basePoints[index], originalEndPoint)) { - point.y = Big(point.y).plus(absMove).toNumber(); + point.y = Big(point.y).plus(moveUpDownLength).toNumber(); } // if (isSamePoint(roof.basePoints[index], originalEndPoint)) { // point.y = Big(point.y).plus(absMove).toNumber(); @@ -248,31 +248,31 @@ const movingLineFromSkeleton = (roofId, canvas) => { }else if (position === 'top'){ if(moveDirection === 'in'){ if(isSamePoint(roof.basePoints[index], originalStartPoint)) { - point.y = Big(point.y).plus(absMove).toNumber(); + point.y = Big(point.y).plus(moveUpDownLength).toNumber(); } if (isSamePoint(roof.basePoints[index], originalEndPoint)) { - point.y = Big(point.y).plus(absMove).toNumber(); + point.y = Big(point.y).plus(moveUpDownLength).toNumber(); } }else if(moveDirection === 'out'){ if(isSamePoint(roof.basePoints[index], originalStartPoint)) { - point.y = Big(point.y).minus(absMove).toNumber(); + point.y = Big(point.y).minus(moveUpDownLength).toNumber(); } if (isSamePoint(roof.basePoints[index], originalEndPoint)) { - point.y = Big(point.y).minus(absMove).toNumber(); + point.y = Big(point.y).minus(moveUpDownLength).toNumber(); } } }else if(position === 'left'){ if(moveDirection === 'in'){ if(isSamePoint(roof.basePoints[index], originalStartPoint) || isSamePoint(roof.basePoints[index], originalEndPoint)) { - point.x = Big(point.x).plus(absMove).toNumber(); + point.x = Big(point.x).plus(moveUpDownLength).toNumber(); } // if (isSamePoint(roof.basePoints[index], originalEndPoint)) { // point.x = Big(point.x).plus(absMove).toNumber(); // } }else if(moveDirection === 'out'){ if(isSamePoint(roof.basePoints[index], originalStartPoint) || isSamePoint(roof.basePoints[index], originalEndPoint)) { - point.x = Big(point.x).minus(absMove).toNumber(); + point.x = Big(point.x).minus(moveUpDownLength).toNumber(); } // if (isSamePoint(roof.basePoints[index], originalEndPoint)) { // point.x = Big(point.x).minus(absMove).toNumber(); @@ -282,17 +282,17 @@ const movingLineFromSkeleton = (roofId, canvas) => { }else if(position === 'right'){ if(moveDirection === 'in'){ if(isSamePoint(roof.basePoints[index], originalStartPoint)) { - point.x = Big(point.x).minus(absMove).toNumber(); + point.x = Big(point.x).minus(moveUpDownLength).toNumber(); } if (isSamePoint(roof.basePoints[index], originalEndPoint)) { - point.x = Big(point.x).minus(absMove).toNumber(); + point.x = Big(point.x).minus(moveUpDownLength).toNumber(); } }else if(moveDirection === 'out'){ if(isSamePoint(roof.basePoints[index], originalStartPoint)) { - point.x = Big(point.x).plus(absMove).toNumber(); + point.x = Big(point.x).plus(moveUpDownLength).toNumber(); } if (isSamePoint(roof.basePoints[index], originalEndPoint)) { - point.x = Big(point.x).plus(absMove).toNumber(); + point.x = Big(point.x).plus(moveUpDownLength).toNumber(); } }