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