From c42e244f24027459b5174889dd783334926afcc2 Mon Sep 17 00:00:00 2001 From: yjnoh Date: Wed, 9 Apr 2025 14:13:55 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A2=8C=ED=91=9C=EA=B0=80=20=EC=9D=8C?= =?UTF-8?q?=EC=88=98=EC=9D=BC=EB=95=8C=20=EB=B3=B4=EC=A0=95=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/module/useModuleBasicSetting.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/hooks/module/useModuleBasicSetting.js b/src/hooks/module/useModuleBasicSetting.js index e03f3852..c7631dcb 100644 --- a/src/hooks/module/useModuleBasicSetting.js +++ b/src/hooks/module/useModuleBasicSetting.js @@ -388,8 +388,6 @@ export function useModuleBasicSetting(tabNum) { //모듈,회로에서 다른메뉴 -> 배치면으로 갈 경수 초기화 const restoreModuleInstArea = () => { - console.log('tabnum', tabNum) - //설치면 삭제 const setupArea = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE || obj.name === POLYGON_TYPE.OBJECT_SURFACE) @@ -2494,8 +2492,9 @@ export function useModuleBasicSetting(tabNum) { } return acc }, - { x1: 0, y1: 0, index: -1 }, // 초기값: 무한대와 유효하지 않은 인덱스 + { x1: -Infinity, y1: -Infinity, index: -1 }, ) + flowArray.push(bottomFlow) const topFlow = surface.lines.reduce( @@ -2505,8 +2504,9 @@ export function useModuleBasicSetting(tabNum) { } return acc }, - { x1: Infinity, y1: Infinity, index: -1 }, // 초기값: 무한대와 유효하지 않은 인덱스 + { x1: Infinity, y1: Infinity, index: -1 }, ) + flowArray.push(topFlow) let rtnObjArray = [] @@ -2557,9 +2557,6 @@ export function useModuleBasicSetting(tabNum) { //디버깅 const finalLine = new QLine([pointX1, pointY1, pointX2, pointY2], { stroke: 'red', strokeWidth: 1, selectable: true }) - - // console.log(`index ${index} : finalLine`, pointX1, pointY1, pointX2, pointY2) - // canvas?.add(finalLine) // canvas?.renderAll() @@ -2610,8 +2607,9 @@ export function useModuleBasicSetting(tabNum) { } return acc }, - { x1: Infinity, y1: Infinity, index: -1 }, // 초기값: 무한대와 유효하지 않은 인덱스 + { x1: Infinity, y1: Infinity, index: -1 }, ) + flowArray.push(leftFlow) const rightFlow = surface.lines.reduce( @@ -2621,8 +2619,9 @@ export function useModuleBasicSetting(tabNum) { } return acc }, - { x1: 0, y1: 0, index: -1 }, // 초기값: 무한대와 유효하지 않은 인덱스 + { x1: -Infinity, y1: -Infinity, index: -1 }, ) + flowArray.push(rightFlow) let rtnObjArray = []