지붕재 오류 수정
This commit is contained in:
parent
0030c665c1
commit
614aec95b7
@ -180,6 +180,7 @@ export const SAVE_KEY = [
|
||||
'directionText',
|
||||
'quotationParam',
|
||||
'pcses',
|
||||
'roofMaterial',
|
||||
]
|
||||
|
||||
export const OBJECT_PROTOTYPE = [fabric.Line.prototype, fabric.Polygon.prototype, fabric.Triangle.prototype]
|
||||
|
||||
@ -44,7 +44,7 @@ export default function FirstOption(props) {
|
||||
const polygons = canvas?.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF)
|
||||
|
||||
polygons.forEach((polygon) => {
|
||||
setSurfaceShapePattern(polygon, item.column, false, polygon.roofMaterial, true)
|
||||
setSurfaceShapePattern(polygon, item.column, false, polygon.roofMaterial, true, true)
|
||||
})
|
||||
//디스플레이 설정 표시(단 건 선택)
|
||||
} else {
|
||||
|
||||
@ -20,19 +20,23 @@ export function useRoofFn() {
|
||||
const { addPitchText } = useLine()
|
||||
|
||||
//면형상 선택 클릭시 지붕 패턴 입히기
|
||||
function setSurfaceShapePattern(polygon, mode = 'onlyBorder', trestleMode = false, roofMaterial = selectedRoofMaterial, isForceChange = false) {
|
||||
function setSurfaceShapePattern(
|
||||
polygon,
|
||||
mode = 'onlyBorder',
|
||||
trestleMode = false,
|
||||
roofMaterial = selectedRoofMaterial,
|
||||
isForceChange = false,
|
||||
isDisplay = false,
|
||||
) {
|
||||
if (!polygon) {
|
||||
return
|
||||
}
|
||||
if (isForceChange) {
|
||||
if (polygon.roofMaterial) {
|
||||
if (isForceChange && !isDisplay) {
|
||||
/*if (polygon.roofMaterial) {
|
||||
polygon.roofMaterial = null
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
if (polygon.roofMaterial) {
|
||||
return
|
||||
}
|
||||
const ratio = window.devicePixelRatio || 1
|
||||
const layout = roofMaterial.layout
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user