Merge branch 'qcast-pub' into dev
This commit is contained in:
commit
27f62ea355
@ -307,6 +307,7 @@ export default function CanvasMenu(props) {
|
|||||||
const settingsModalOptions = useRecoilState(settingModalFirstOptionsState)
|
const settingsModalOptions = useRecoilState(settingModalFirstOptionsState)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
console.log(selectedMenu)
|
||||||
if (selectedMenu === 'placement') {
|
if (selectedMenu === 'placement') {
|
||||||
onClickPlacementInitialMenu()
|
onClickPlacementInitialMenu()
|
||||||
}
|
}
|
||||||
@ -315,8 +316,9 @@ export default function CanvasMenu(props) {
|
|||||||
if (moduleSurfacesArray.length > 0) {
|
if (moduleSurfacesArray.length > 0) {
|
||||||
initRoofs()
|
initRoofs()
|
||||||
moduleSurfacesArray.forEach((moduleSurface) => {
|
moduleSurfacesArray.forEach((moduleSurface) => {
|
||||||
moduleSurface.modules = []
|
canvas.remove(...moduleSurface.modules)
|
||||||
canvas.remove(moduleSurface)
|
canvas.remove(moduleSurface)
|
||||||
|
moduleSurface.modules = []
|
||||||
})
|
})
|
||||||
canvas.renderAll()
|
canvas.renderAll()
|
||||||
}
|
}
|
||||||
@ -422,7 +424,7 @@ export default function CanvasMenu(props) {
|
|||||||
|
|
||||||
const checkMenuState = (menu) => {
|
const checkMenuState = (menu) => {
|
||||||
return (
|
return (
|
||||||
(['2', '3'].includes(canvasSetting?.roofSizeSet) && menu.type === 'surface') ||
|
(['2', '3'].includes(canvasSetting?.roofSizeSet) && menu.type === 'outline') ||
|
||||||
(selectedMenu === 'module' && ['drawing', 'placement'].includes(menu.type))
|
(selectedMenu === 'module' && ['drawing', 'placement'].includes(menu.type))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -542,7 +544,7 @@ export default function CanvasMenu(props) {
|
|||||||
key={`canvas-menu-${menu.type}`}
|
key={`canvas-menu-${menu.type}`}
|
||||||
className={`canvas-menu-item ${selectedMenu === menu.type ? 'active' : ''}`}
|
className={`canvas-menu-item ${selectedMenu === menu.type ? 'active' : ''}`}
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
if (['2', '3'].includes(canvasSetting?.roofSizeSet) && menu.type === 'surface') return
|
if (['2', '3'].includes(canvasSetting?.roofSizeSet) && menu.type === 'outline') return
|
||||||
if (selectedMenu === 'module' && ['drawing', 'placement'].includes(menu.type)) return
|
if (selectedMenu === 'module' && ['drawing', 'placement'].includes(menu.type)) return
|
||||||
await onClickNav(menu)
|
await onClickNav(menu)
|
||||||
}}
|
}}
|
||||||
|
|||||||
@ -456,6 +456,7 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
|
|||||||
<button
|
<button
|
||||||
className={`${+currentRoof.roofSizeSet !== 3 && 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}
|
||||||
|
disabled={currentRoof?.roofSizeSet === '3'}
|
||||||
onClick={() => handleRoofLayoutChange(ROOF_MATERIAL_LAYOUT.PARALLEL)}
|
onClick={() => handleRoofLayoutChange(ROOF_MATERIAL_LAYOUT.PARALLEL)}
|
||||||
>
|
>
|
||||||
{getMessage('modal.roof.alloc.select.parallel')}
|
{getMessage('modal.roof.alloc.select.parallel')}
|
||||||
@ -463,6 +464,7 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
|
|||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
className={`${+currentRoof.roofSizeSet !== 3 && currentRoof.layout === ROOF_MATERIAL_LAYOUT.STAIRS && 'act'}`}
|
className={`${+currentRoof.roofSizeSet !== 3 && currentRoof.layout === ROOF_MATERIAL_LAYOUT.STAIRS && 'act'}`}
|
||||||
|
disabled={currentRoof?.roofSizeSet === '3'}
|
||||||
value={ROOF_MATERIAL_LAYOUT.STAIRS}
|
value={ROOF_MATERIAL_LAYOUT.STAIRS}
|
||||||
onClick={() => handleRoofLayoutChange(ROOF_MATERIAL_LAYOUT.STAIRS)}
|
onClick={() => handleRoofLayoutChange(ROOF_MATERIAL_LAYOUT.STAIRS)}
|
||||||
>
|
>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user