From 7ab481ec368334189b76fe32b9388a3749f07753 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Tue, 22 Oct 2024 17:24:51 +0900 Subject: [PATCH] =?UTF-8?q?canvas=20=EC=A0=80=EC=9E=A5=20=EC=8B=9C=20?= =?UTF-8?q?=EA=B0=92=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/roofcover/useRoofAllocationSetting.js | 4 +++- src/hooks/usePlan.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hooks/roofcover/useRoofAllocationSetting.js b/src/hooks/roofcover/useRoofAllocationSetting.js index 6eba271f..d219cf24 100644 --- a/src/hooks/roofcover/useRoofAllocationSetting.js +++ b/src/hooks/roofcover/useRoofAllocationSetting.js @@ -5,10 +5,12 @@ import { setSurfaceShapePattern } from '@/util/canvas-util' import { splitPolygonWithLines } from '@/util/qpolygon-utils' import { useSwal } from '@/hooks/useSwal' import { usePolygon } from '@/hooks/usePolygon' +import { roofDisplaySelector } from '@/store/settingAtom' // 지붕면 할당 export function useRoofAllocationSetting(setShowRoofAllocationSettingModal) { const canvas = useRecoilValue(canvasState) + const roofDisplay = useRecoilValue(roofDisplaySelector) const { drawDirectionArrow } = usePolygon() const { swalFire } = useSwal() @@ -117,7 +119,7 @@ export function useRoofAllocationSetting(setShowRoofAllocationSettingModal) { const roofs = canvas.getObjects().filter((obj) => obj.name === 'roof') roofs.forEach((roof) => { - setSurfaceShapePattern(roof) + setSurfaceShapePattern(roof, roofDisplay.column) drawDirectionArrow(roof) }) setShowRoofAllocationSettingModal(false) diff --git a/src/hooks/usePlan.js b/src/hooks/usePlan.js index b1273d82..dc5286d4 100644 --- a/src/hooks/usePlan.js +++ b/src/hooks/usePlan.js @@ -60,6 +60,7 @@ export function usePlan() { 'attributes', 'stickeyPoint', 'text', + 'pitch', ]) const str = JSON.stringify(objs)