- Shed 확장자 수정

- 지붕면 할당에 경사 정보 추가
This commit is contained in:
김민식 2025-01-09 15:46:32 +09:00
parent b5ab8c803e
commit 73e2933306
3 changed files with 52 additions and 0 deletions

View File

@ -10,6 +10,7 @@ import { ROOF_MATERIAL_LAYOUT } from '@/components/floor-plan/modal/placementSha
import { useCanvasSetting } from '@/hooks/option/useCanvasSetting'
import { useCommonCode } from '@/hooks/common/useCommonCode'
import { globalLocaleStore } from '@/store/localeAtom'
import { useRoofShapeSetting } from '@/hooks/roofcover/useRoofShapeSetting'
export default function RoofAllocationSetting(props) {
const contextPopupPosition = useRecoilValue(contextPopupPositionState)
@ -29,6 +30,7 @@ export default function RoofAllocationSetting(props) {
handleChangeLayout,
currentRoofList,
} = useRoofAllocationSetting(id)
const { pitchText } = useRoofShapeSetting(id)
const { findCommonCode } = useCommonCode()
const [raftCodes, setRaftCodes] = useState([])
const globalLocale = useRecoilValue(globalLocaleStore)
@ -104,6 +106,15 @@ export default function RoofAllocationSetting(props) {
{index !== 0 && <button className="delete" onClick={() => onDeleteRoofMaterial(index)}></button>}
</div>
</div>
<div className="block-box">
<div className="flex-ment">
<span>{getMessage('slope')}</span>
<div className="input-grid" style={{ width: '214px' }}>
<input type="text" className="input-origin block" defaultValue={4} />
</div>
<span>{pitchText}</span>
</div>
</div>
{(roof.widAuth || roof.lenAuth) && (
<div className="block-box">
{roof.widAuth && (

View File

@ -0,0 +1,18 @@
import { useMessage } from '@/hooks/useMessage'
export default function Shed({ offsetRef }) {
const { getMessage } = useMessage()
return (
<>
<div className="outline-form mb10">
<span className="mr10" style={{ width: '63px' }}>
{getMessage('shed.width')}
</span>
<div className="input-grid mr5">
<input type="text" className="input-origin block" defaultValue={300} ref={offsetRef} />
</div>
<span className="thin">mm</span>
</div>
</>
)
}

View File

@ -572,6 +572,29 @@ export function useContextMenu() {
],
])
break
case 'adsorptionPoint':
setContextMenu([
[
{
id: 'remove',
name: getMessage('contextmenu.remove'),
fn: () => {
canvas.remove(currentObject)
canvas.discardActiveObject()
},
},
{
id: 'removeAll',
name: getMessage('contextmenu.remove.all'),
fn: () => {
removeGrid()
removeAdsorptionPoint()
canvas.discardActiveObject()
},
},
],
])
break
case 'dimensionGroup':
setContextMenu([
[