지붕재 할당후 처리 추가

This commit is contained in:
hyojun.choi 2025-05-14 10:59:29 +09:00
parent e8457da05f
commit a8c57b1c53
3 changed files with 10 additions and 2 deletions

View File

@ -383,6 +383,7 @@ export function useRoofAllocationSetting(id) {
} }
} catch (e) { } catch (e) {
console.log(e) console.log(e)
canvas.discardActiveObject()
return return
} }

View File

@ -1168,6 +1168,15 @@ export const usePolygon = () => {
canvas.remove(polygon) canvas.remove(polygon)
canvas.renderAll() canvas.renderAll()
}) })
//지붕 완료 후 보조선을 전부 제거한다.
const auxiliaryLines = canvas.getObjects().filter((obj) => obj.name === 'auxiliaryLine')
auxiliaryLines.forEach((line) => {
canvas.remove(line)
})
canvas.renderAll()
canvas.discardActiveObject()
} }
const getSplitRoofsPoints = (allLines) => { const getSplitRoofsPoints = (allLines) => {

View File

@ -549,8 +549,6 @@ export function isPointOnLine({ x1, y1, x2, y2 }, { x, y }, epsilon = 2) {
withinYRange = withinYRange && 2 <= Math.max(y1, y2) - y withinYRange = withinYRange && 2 <= Math.max(y1, y2) - y
} }
console.log(Math.min(x1, x2) - x, Math.max(x1, x2) - x)
return withinXRange && withinYRange return withinXRange && withinYRange
} }
/** /**