코드 정리
This commit is contained in:
parent
340c7669af
commit
bf0e1e4cb0
@ -334,6 +334,7 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, {
|
||||
if (types.every((type) => type === LINE_TYPE.WALLLINE.EAVES)) {
|
||||
// 용마루 -- straight-skeleton
|
||||
console.log('용마루 지붕')
|
||||
drawRidgeRoof(this.id, this.canvas, textMode)
|
||||
} else if (isGableRoof(types)) {
|
||||
// A형, B형 박공 지붕
|
||||
console.log('패턴 지붕')
|
||||
|
||||
@ -994,12 +994,6 @@ export const drawGableRoof = (roofId, canvas, textMode) => {
|
||||
const points = findPloygonLineOverlap(roof, [ridgePoint[0].x, ridgePoint[0].y, ridgePoint[1].x, ridgePoint[1].y], canvas, roofId)
|
||||
ridgeLines.push(drawRidgeLine(points, canvas, roof, textMode))
|
||||
})
|
||||
|
||||
canvas
|
||||
.getObjects()
|
||||
.filter((object) => object.name === 'check')
|
||||
.forEach((object) => canvas.remove(object))
|
||||
canvas.renderAll()
|
||||
})
|
||||
|
||||
/**
|
||||
@ -1395,11 +1389,6 @@ export const drawGableRoof = (roofId, canvas, textMode) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
canvas
|
||||
.getObjects()
|
||||
.filter((obj) => obj.name === 'check')
|
||||
.forEach((obj) => canvas.remove(obj))
|
||||
canvas.renderAll()
|
||||
}
|
||||
|
||||
forwardLines.forEach((forward) => {
|
||||
@ -1409,6 +1398,11 @@ export const drawGableRoof = (roofId, canvas, textMode) => {
|
||||
drawRoofPlane(backward)
|
||||
})
|
||||
roof.innerLines.push(...ridgeLines, ...innerLines)
|
||||
canvas
|
||||
.getObjects()
|
||||
.filter((obj) => obj.name === 'check')
|
||||
.forEach((obj) => canvas.remove(obj))
|
||||
canvas.renderAll()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user