동이동변경

This commit is contained in:
ysCha 2025-12-18 17:27:28 +09:00
parent abb498178d
commit 7be6b60e12

View File

@ -608,9 +608,8 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
canvas.renderAll();
});
if((roof.moveUpDown??0 > 0) || (roof.moveFlowLine??0 > 0) ) {
//if((roof.moveUpDown??0 > 0) ) {
const getMoveUpDownLine = () => {
// 같은 라인이 없으므로 새 다각형 라인 생성
//라인 편집
// let i = 0
@ -657,6 +656,20 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
});
}
// function sortCurrentRoofLines(lines) {
// return [...lines].sort((a, b) => {
// const aX = a.x1 ?? a.get('x1')
// const aY = a.y1 ?? a.get('y1')
// const bX = b.x1 ?? b.get('x1')
// const bY = b.y1 ?? b.get('y1')
// if (aX !== bX) return aX - bX
// return aY - bY
// })
// }
// 각 라인 집합 정렬
// roofLines의 방향에 맞춰 currentRoofLines의 방향을 조정
@ -711,6 +724,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
});
};
console.log("wallBaseLines", wall.baseLines)
// const sortedWallLines = sortCurrentRoofLines(wall.lines);
// roofLines의 방향에 맞춰 currentRoofLines 조정 후 정렬
const alignedCurrentRoofLines = alignLineDirection(currentRoofLines, roofLines);
@ -798,20 +812,17 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
strokeWidth: 4,
name : 'eaveHelpLine',
lineName : 'eaveHelpLine',
selectable : true,
visible : true,
roofId : roofId,
selectable: true,
hoverCursor: 'pointer',
attributes : {
type: 'eaveHelpLine',
isStart : true,
pitch: wallLine.attributes.pitch,
}
});
//coordinateText(line)
canvas.add(line)
line.bringToFront()
canvas.renderAll();
return line
}
@ -1493,12 +1504,10 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
}
canvas.renderAll()
});
}
getMoveUpDownLine()
}
// }
if (findPoints.length > 0) {
// 모든 점에 대해 라인 업데이트를 누적