dev #459

Merged
ysCha merged 3 commits from dev into dev-deploy 2025-12-10 11:22:20 +09:00
3 changed files with 53 additions and 48 deletions

View File

@ -32,6 +32,7 @@ import { useEvent } from '@/hooks/useEvent'
import { compasDegAtom } from '@/store/orientationAtom' import { compasDegAtom } from '@/store/orientationAtom'
import { hotkeyStore } from '@/store/hotkeyAtom' import { hotkeyStore } from '@/store/hotkeyAtom'
import { usePopup } from '@/hooks/usePopup' import { usePopup } from '@/hooks/usePopup'
import { outerLinePointsState } from '@/store/outerLineAtom'
export default function CanvasFrame() { export default function CanvasFrame() {
const canvasRef = useRef(null) const canvasRef = useRef(null)
@ -45,6 +46,7 @@ export default function CanvasFrame() {
const totalDisplay = useRecoilValue(totalDisplaySelector) // const totalDisplay = useRecoilValue(totalDisplaySelector) //
const { setIsGlobalLoading } = useContext(QcastContext) const { setIsGlobalLoading } = useContext(QcastContext)
const resetModuleStatisticsState = useResetRecoilState(moduleStatisticsState) const resetModuleStatisticsState = useResetRecoilState(moduleStatisticsState)
const resetOuterLinePoints = useResetRecoilState(outerLinePointsState)
const resetMakersState = useResetRecoilState(makersState) const resetMakersState = useResetRecoilState(makersState)
const resetSelectedMakerState = useResetRecoilState(selectedMakerState) const resetSelectedMakerState = useResetRecoilState(selectedMakerState)
const resetSeriesState = useResetRecoilState(seriesState) const resetSeriesState = useResetRecoilState(seriesState)
@ -137,6 +139,7 @@ export default function CanvasFrame() {
const resetRecoilData = () => { const resetRecoilData = () => {
// resetModuleStatisticsState() // resetModuleStatisticsState()
resetOuterLinePoints()
resetMakersState() resetMakersState()
resetSelectedMakerState() resetSelectedMakerState()
resetSeriesState() resetSeriesState()

View File

@ -264,7 +264,6 @@ export default function Simulator() {
style={{ width: '30%' }} style={{ width: '30%' }}
className="select-light" className="select-light"
value={pwrGnrSimType} value={pwrGnrSimType}
defaultValue={`D`}
onChange={(e) => { onChange={(e) => {
handleChartChangeData(e.target.value) handleChartChangeData(e.target.value)
setPwrGnrSimType(e.target.value) setPwrGnrSimType(e.target.value)
@ -337,7 +336,6 @@ export default function Simulator() {
{moduleInfoList.length > 0 ? ( {moduleInfoList.length > 0 ? (
moduleInfoList.map((moduleInfo) => { moduleInfoList.map((moduleInfo) => {
return ( return (
<>
<tr key={moduleInfo.itemId}> <tr key={moduleInfo.itemId}>
{/* 지붕면 */} {/* 지붕면 */}
<td>{moduleInfo.roofSurface}</td> <td>{moduleInfo.roofSurface}</td>
@ -355,7 +353,6 @@ export default function Simulator() {
{/* 매수 */} {/* 매수 */}
<td>{convertNumberToPriceDecimal(moduleInfo.amount)}</td> <td>{convertNumberToPriceDecimal(moduleInfo.amount)}</td>
</tr> </tr>
</>
) )
}) })
) : ( ) : (
@ -388,7 +385,6 @@ export default function Simulator() {
{pcsInfoList.length > 0 ? ( {pcsInfoList.length > 0 ? (
pcsInfoList.map((pcsInfo) => { pcsInfoList.map((pcsInfo) => {
return ( return (
<>
<tr key={pcsInfo.itemId}> <tr key={pcsInfo.itemId}>
{/* 파워컨디셔너 */} {/* 파워컨디셔너 */}
<td className="al-l"> <td className="al-l">
@ -397,7 +393,6 @@ export default function Simulator() {
{/* 대 */} {/* 대 */}
<td>{convertNumberToPriceDecimal(pcsInfo.amount)}</td> <td>{convertNumberToPriceDecimal(pcsInfo.amount)}</td>
</tr> </tr>
</>
) )
}) })
) : ( ) : (

View File

@ -374,11 +374,18 @@ export function useRoofAllocationSetting(id) {
setBasicSetting((prev) => { setBasicSetting((prev) => {
return { ...prev, selectedRoofMaterial: newRoofList.find((roof) => roof.selected) } return { ...prev, selectedRoofMaterial: newRoofList.find((roof) => roof.selected) }
}) })
const selectedRoofMaterial = newRoofList.find((roof) => roof.selected)
const roofs = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF && obj.roofMaterial?.index === selectedRoofMaterial.index)
roofs.forEach((roof) => {
setSurfaceShapePattern(roof, roofDisplay.column, false, { ...selectedRoofMaterial }, true)
drawDirectionArrow(roof)
})
setRoofList(newRoofList) setRoofList(newRoofList)
setRoofMaterials(newRoofList) setRoofMaterials(newRoofList)
setRoofsStore(newRoofList) setRoofsStore(newRoofList)
const selectedRoofMaterial = newRoofList.find((roof) => roof.selected)
setSurfaceShapePattern(currentObject, roofDisplay.column, false, selectedRoofMaterial, true) setSurfaceShapePattern(currentObject, roofDisplay.column, false, selectedRoofMaterial, true)
drawDirectionArrow(currentObject) drawDirectionArrow(currentObject)
modifyModuleSelectionData() modifyModuleSelectionData()