육지붕 대응 추가

This commit is contained in:
hyojun.choi 2025-02-19 18:17:47 +09:00
parent 044af5b6ac
commit c2a063cf9e
2 changed files with 21 additions and 7 deletions

View File

@ -565,16 +565,26 @@ export default function CanvasMenu(props) {
<div className="select-box">
{
<QSelectBox
//options={addedRoofs}
options={addedRoofs.map((roof) => {
return { ...roof, name: globalLocale === 'ko' ? roof.roofMatlNm : roof.roofMatlNmJp }
})}
//showKey={'roofMatlNm'}
title={
+basicSetting.roofSizeSet === 3
? getMessage('modal.placement.initial.setting.size.none.pitch')
: globalLocale === 'ko'
? selectedRoofMaterial?.roofMatlNm
: selectedRoofMaterial?.roofMatlNmJp
}
options={
+basicSetting.roofSizeSet === 3
? []
: addedRoofs.map((roof) => {
return { ...roof, name: globalLocale === 'ko' ? roof.roofMatlNm : roof.roofMatlNmJp }
})
}
showKey={'name'}
value={selectedRoofMaterial}
onChange={changeSelectedRoofMaterial}
sourceKey={'index'}
targetKey={'index'}
disabled={+basicSetting.roofSizeSet === 3}
/>
}
</div>

View File

@ -170,6 +170,10 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
}
const handleRoofLayoutChange = (value) => {
if (+currentRoof.roofSizeSet === 3) {
setCurrentRoof({ ...currentRoof, layout: ROOF_MATERIAL_LAYOUT.PARALLEL })
return
}
setCurrentRoof({ ...currentRoof, layout: value })
}
@ -451,7 +455,7 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
<div className="placement-roof-btn-wrap">
<div className="icon-btn-wrap mt10">
<button
className={`${currentRoof?.layout === ROOF_MATERIAL_LAYOUT.PARALLEL && 'act'}`}
className={`${+currentRoof.roofSizeSet !== 3 && currentRoof?.layout === ROOF_MATERIAL_LAYOUT.PARALLEL && 'act'}`}
value={ROOF_MATERIAL_LAYOUT.PARALLEL}
onClick={() => handleRoofLayoutChange(ROOF_MATERIAL_LAYOUT.PARALLEL)}
>
@ -459,7 +463,7 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
<i className="allocation01"></i>
</button>
<button
className={`${currentRoof.layout === ROOF_MATERIAL_LAYOUT.STAIRS && 'act'}`}
className={`${+currentRoof.roofSizeSet !== 3 && currentRoof.layout === ROOF_MATERIAL_LAYOUT.STAIRS && 'act'}`}
value={ROOF_MATERIAL_LAYOUT.STAIRS}
onClick={() => handleRoofLayoutChange(ROOF_MATERIAL_LAYOUT.STAIRS)}
>