object 배치 수정
This commit is contained in:
parent
f30fe6337f
commit
e186ca1774
@ -51,15 +51,12 @@ export default function ObjectSetting({ setShowObjectSettingModal }) {
|
||||
}
|
||||
|
||||
const applyObject = () => {
|
||||
// if (surfaceShapePolygons.length === 0) {
|
||||
// swalFire({ text: '지붕이 없어요 지붕부터 그리세요', icon: 'error' })
|
||||
// return
|
||||
// }
|
||||
if (surfaceShapePolygons.length === 0) {
|
||||
swalFire({ text: '지붕이 없어요 지붕부터 그리세요', icon: 'error' })
|
||||
return
|
||||
}
|
||||
|
||||
//개구배치, 그림자배치
|
||||
|
||||
console.log(surfaceShapePolygons)
|
||||
|
||||
if (buttonAct === 1 || buttonAct === 2) {
|
||||
applyOpeningAndShadow(objectPlacement, buttonAct, surfaceShapePolygons)
|
||||
} else {
|
||||
|
||||
@ -200,20 +200,34 @@ export function useObjectBatch() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 오브젝트 도머 배치
|
||||
* @param {} dormerPlacement
|
||||
* @param {*} buttonAct
|
||||
* @param {*} surfaceShapePolygons
|
||||
* @returns
|
||||
*/
|
||||
const applyDormers = (dormerPlacement, buttonAct, surfaceShapePolygons) => {
|
||||
const dormerName = buttonAct === 3 ? BATCH_TYPE.TRIANGLE_DORMER : BATCH_TYPE.PENTAGON_DORMER
|
||||
const dormerTempName = buttonAct === 3 ? BATCH_TYPE.TRIANGLE_DORMER_TEMP : BATCH_TYPE.PENTAGON_DORMER_TEMP
|
||||
const height = dormerPlacement.heightRef.current.value / 10
|
||||
const width = dormerPlacement.widthRef.current.value / 10
|
||||
const pitch = dormerPlacement.pitchRef.current.value
|
||||
const offsetRef = dormerPlacement.offsetRef.current.value === '' ? 0 : parseInt(dormerPlacement.offsetRef.current.value) / 10
|
||||
const offsetWidthRef = dormerPlacement.offsetWidthRef.current.value === '' ? 0 : parseInt(dormerPlacement.offsetWidthRef.current.value) / 10
|
||||
const height = dormerPlacement.heightRef.current !== null ? dormerPlacement.heightRef.current.value / 10 : 0
|
||||
const width = dormerPlacement.widthRef.current !== null ? dormerPlacement.widthRef.current.value / 10 : 0 //triangle일때는 없음
|
||||
const pitch = dormerPlacement.pitchRef.current !== null ? dormerPlacement.pitchRef.current.value : 0
|
||||
const offsetRef =
|
||||
dormerPlacement.offsetRef.current !== null
|
||||
? dormerPlacement.offsetRef.current.value === ''
|
||||
? 0
|
||||
: parseInt(dormerPlacement.offsetRef.current.value) / 10
|
||||
: 0
|
||||
const offsetWidthRef =
|
||||
dormerPlacement.offsetWidthRef.current !== null
|
||||
? dormerPlacement.offsetWidthRef.current.value === ''
|
||||
? 0
|
||||
: parseInt(dormerPlacement.offsetWidthRef.current.value) / 10
|
||||
: 0
|
||||
const directionRef = dormerPlacement.directionRef.current
|
||||
|
||||
let dormer, dormerOffset, isDown, selectedSurface, pentagonPoints, pentagonOffsetPoints
|
||||
|
||||
console.log('dormerPlacement', dormerPlacement)
|
||||
|
||||
if (height === '' || pitch === '' || height <= 0 || pitch <= 0) {
|
||||
swalFire({ text: getMessage('common.canvas.validate.size'), icon: 'error' })
|
||||
return
|
||||
@ -636,8 +650,6 @@ export function useObjectBatch() {
|
||||
const splitDormerPentagon = (pentagon, direction, offsetMode) => {
|
||||
const points = pentagon.points
|
||||
|
||||
console.log(pentagon.points)
|
||||
|
||||
let leftPoints = []
|
||||
let rightPoints = []
|
||||
|
||||
@ -699,8 +711,6 @@ export function useObjectBatch() {
|
||||
]
|
||||
}
|
||||
|
||||
console.log(leftPoints, rightPoints)
|
||||
|
||||
return [leftPoints, rightPoints]
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user