From 7e13cb20a30432e88851bf2e285c0e979729dd01 Mon Sep 17 00:00:00 2001 From: ysCha Date: Wed, 24 Dec 2025 14:09:34 +0900 Subject: [PATCH] =?UTF-8?q?abs()=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/util/skeleton-utils.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/util/skeleton-utils.js b/src/util/skeleton-utils.js index d43334ea..a94007b3 100644 --- a/src/util/skeleton-utils.js +++ b/src/util/skeleton-utils.js @@ -1057,8 +1057,8 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => { if (isStartEnd.end) { const moveDist = Big(wallLine.x1).minus(wallBaseLine.x1).abs().toNumber() - const aStartY = Big(roofLine.y2).minus(moveDist).abs().toNumber() - const bStartY = Big(wallLine.y2).minus(moveDist).abs().toNumber() + const aStartY = Big(roofLine.y2).minus(moveDist).toNumber() + const bStartY = Big(wallLine.y2).minus(moveDist).toNumber() const inLine = findLineContainingPoint(innerLines, { y: aStartY, x: roofLine.x1 }) console.log('startLines:::::::', inLine) const eLineY = Big(bStartY).minus(wallLine.y2).abs().toNumber() @@ -1168,7 +1168,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => { const newPointY = Big(roofLine.y1).plus(moveDist).toNumber() const pDist = Big(wallLine.y1).minus(roofLine.y1).abs().toNumber() - const pLineX = Big(roofLine.x2).minus(0).abs().toNumber() + const pLineX = Big(roofLine.x2).minus(0).toNumber() // let idx = sortRoofLines.length < index + 1 ? 0 : index // const pLineY = sortRoofLines[idx + 1].y2 @@ -1244,11 +1244,11 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => { } if (isStartEnd.end) { const moveDist = Big(wallLine.y1).minus(wallBaseLine.y1).abs().toNumber() - const aStartX = Big(roofLine.x2).minus(moveDist).abs().toNumber() - const bStartX = Big(wallLine.x2).minus(moveDist).abs().toNumber() + const aStartX = Big(roofLine.x2).minus(moveDist).toNumber() + const bStartX = Big(wallLine.x2).minus(moveDist).toNumber() const inLine = findLineContainingPoint(innerLines, { x: aStartX, y: newPEnd.y }) console.log('startLines:::::::', inLine) - const eLineX = Big(bStartX).minus(wallLine.x2).abs().toNumber() + const eLineX = Big(bStartX).minus(wallLine.x2).toNumber() newPStart.x = roofLine.x1 //Big(newPStart.x).minus(eLineX).abs().toNumber() newPEnd.x = aStartX // let idx = sortRoofLines.length < index + 1 ? 0 : index @@ -1304,7 +1304,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => { const newPointY = Big(roofLine.y2).minus(moveDist).toNumber() const pDist = Big(wallLine.y2).minus(roofLine.y2).abs().toNumber() - const pLineX = Big(roofLine.x1).minus(0).abs().toNumber() + const pLineX = Big(roofLine.x1).minus(0).toNumber() // let idx = 0 > index - 1 ? sortRoofLines.length : index // const pLineY = sortRoofLines[idx - 1].y1 @@ -1331,7 +1331,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => { const newPointY = Big(roofLine.y1).minus(moveDist).toNumber() const pDist = Big(wallLine.y1).minus(roofLine.y1).abs().toNumber() - const pLineX = Big(roofLine.x2).minus(0).abs().toNumber() + const pLineX = Big(roofLine.x2).minus(0).toNumber() // let idx = sortRoofLines.length < index + 1 ? 0 : index // const pLineY = sortRoofLines[idx + 1].y2 @@ -1354,8 +1354,8 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => { console.log('bottom_out isStartEnd:::::::', isStartEnd) if (isStartEnd.start) { const moveDist = Big(wallLine.y1).minus(wallBaseLine.y1).abs().toNumber() - const aStartX = Big(roofLine.x1).minus(moveDist).abs().toNumber() - const bStartX = Big(wallLine.x1).minus(moveDist).abs().toNumber() + const aStartX = Big(roofLine.x1).minus(moveDist).toNumber() + const bStartX = Big(wallLine.x1).minus(moveDist).toNumber() const inLine = findLineContainingPoint(innerLines, { x: aStartX, y: roofLine.y1 }) console.log('startLines:::::::', inLine) const eLineX = Big(bStartX).minus(wallLine.x1).abs().toNumber()