diff --git a/src/util/skeleton-utils.js b/src/util/skeleton-utils.js index e6d1c0b8..b10fb9a1 100644 --- a/src/util/skeleton-utils.js +++ b/src/util/skeleton-utils.js @@ -844,7 +844,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => { const prevIndex = (index - 1 + sortRoofLines.length) % sortRoofLines.length const nextIndex = (index + 1) % sortRoofLines.length - const newLine = sortRoofLines[prevIndex] + const newLine = sortRoofLines[nextIndex] if (Math.abs(wallBaseLine.y1 - wallLine.y1) < 0.1) { if (inLine) { @@ -898,7 +898,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => { const prevIndex = (index - 1 + sortRoofLines.length) % sortRoofLines.length; const nextIndex = (index + 1) % sortRoofLines.length; - const newLine = sortRoofLines[nextIndex] + const newLine = sortRoofLines[prevIndex] if (Math.abs(wallBaseLine.y2 - wallLine.y2) < 0.1) { @@ -1014,7 +1014,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => { const prevIndex = (index - 1 + sortRoofLines.length) % sortRoofLines.length const nextIndex = (index + 1) % sortRoofLines.length - const newLine = sortRoofLines[prevIndex] + const newLine = sortRoofLines[nextIndex] if (Math.abs(wallBaseLine.y1 - wallLine.y1) < 0.1) { if (inLine) { @@ -1068,7 +1068,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => { const prevIndex = (index - 1 + sortRoofLines.length) % sortRoofLines.length; const nextIndex = (index + 1) % sortRoofLines.length; - const newLine = sortRoofLines[nextIndex] + const newLine = sortRoofLines[prevIndex] if (inLine) { if (inLine.x2 < inLine.x1) { @@ -1203,7 +1203,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => { const prevIndex = (index - 1 + sortRoofLines.length) % sortRoofLines.length; const nextIndex = (index + 1) % sortRoofLines.length; - const newLine = sortRoofLines[prevIndex] + const newLine = sortRoofLines[nextIndex] if (Math.abs(wallBaseLine.x1 - wallLine.x1) < 0.1) { if (inLine) { @@ -1255,7 +1255,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => { const prevIndex = (index - 1 + sortRoofLines.length) % sortRoofLines.length; const nextIndex = (index + 1) % sortRoofLines.length; - const newLine = sortRoofLines[nextIndex] + const newLine = sortRoofLines[prevIndex] if (Math.abs(wallBaseLine.x2 - wallLine.x2) < 0.1) { if (inLine) { @@ -1365,7 +1365,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => { const prevIndex = (index - 1 + sortRoofLines.length) % sortRoofLines.length; const nextIndex = (index + 1) % sortRoofLines.length; - const newLine = sortRoofLines[prevIndex] + const newLine = sortRoofLines[nextIndex] if (Math.abs(wallBaseLine.x1 - wallLine.x1) < 0.1) { if (inLine) { @@ -1419,7 +1419,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => { const prevIndex = (index - 1 + sortRoofLines.length) % sortRoofLines.length; const nextIndex = (index + 1) % sortRoofLines.length; - const newLine = sortRoofLines[nextIndex] + const newLine = sortRoofLines[prevIndex] if (Math.abs(wallBaseLine.x2 - wallLine.x2) < 0.1) { if (inLine) {