육지붕 대응 추가

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"> <div className="select-box">
{ {
<QSelectBox <QSelectBox
//options={addedRoofs} title={
options={addedRoofs.map((roof) => { +basicSetting.roofSizeSet === 3
return { ...roof, name: globalLocale === 'ko' ? roof.roofMatlNm : roof.roofMatlNmJp } ? getMessage('modal.placement.initial.setting.size.none.pitch')
})} : globalLocale === 'ko'
//showKey={'roofMatlNm'} ? selectedRoofMaterial?.roofMatlNm
: selectedRoofMaterial?.roofMatlNmJp
}
options={
+basicSetting.roofSizeSet === 3
? []
: addedRoofs.map((roof) => {
return { ...roof, name: globalLocale === 'ko' ? roof.roofMatlNm : roof.roofMatlNmJp }
})
}
showKey={'name'} showKey={'name'}
value={selectedRoofMaterial} value={selectedRoofMaterial}
onChange={changeSelectedRoofMaterial} onChange={changeSelectedRoofMaterial}
sourceKey={'index'} sourceKey={'index'}
targetKey={'index'} targetKey={'index'}
disabled={+basicSetting.roofSizeSet === 3}
/> />
} }
</div> </div>

View File

@ -170,6 +170,10 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
} }
const handleRoofLayoutChange = (value) => { const handleRoofLayoutChange = (value) => {
if (+currentRoof.roofSizeSet === 3) {
setCurrentRoof({ ...currentRoof, layout: ROOF_MATERIAL_LAYOUT.PARALLEL })
return
}
setCurrentRoof({ ...currentRoof, layout: value }) 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="placement-roof-btn-wrap">
<div className="icon-btn-wrap mt10"> <div className="icon-btn-wrap mt10">
<button <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} value={ROOF_MATERIAL_LAYOUT.PARALLEL}
onClick={() => handleRoofLayoutChange(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> <i className="allocation01"></i>
</button> </button>
<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} value={ROOF_MATERIAL_LAYOUT.STAIRS}
onClick={() => handleRoofLayoutChange(ROOF_MATERIAL_LAYOUT.STAIRS)} onClick={() => handleRoofLayoutChange(ROOF_MATERIAL_LAYOUT.STAIRS)}
> >