From c4fa290dd5af0384bd7f82c33c2a784a28e67b1a Mon Sep 17 00:00:00 2001 From: yjnoh Date: Thu, 20 Feb 2025 17:45:04 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A9=80=ED=8B=B0=20=EB=AA=A8=EB=93=88=20?= =?UTF-8?q?=EC=9C=84=EC=B9=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/module/useModuleBasicSetting.js | 29 +++++++++++++---------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/src/hooks/module/useModuleBasicSetting.js b/src/hooks/module/useModuleBasicSetting.js index 3c27393b..a0741c1b 100644 --- a/src/hooks/module/useModuleBasicSetting.js +++ b/src/hooks/module/useModuleBasicSetting.js @@ -387,6 +387,7 @@ export function useModuleBasicSetting(tabNum) { */ const manualModuleSetup = () => { // console.log('isManualModuleSetup', isManualModuleSetup) + const moduleSetupSurfaces = canvas?.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE) //모듈설치면를 가져옴 if (isManualModuleSetup) { @@ -414,7 +415,7 @@ export function useModuleBasicSetting(tabNum) { const moduleOptions = { fill: checkedModule[0].color, stroke: 'black', - strokeWidth: 0.1, + strokeWidth: 0.3, selectable: true, // 선택 가능하게 설정 lockMovementX: true, // X 축 이동 잠금 lockMovementY: true, // Y 축 이동 잠금 @@ -933,6 +934,10 @@ export function useModuleBasicSetting(tabNum) { //근데 양변이 곡선이면 중앙에 맞추기 위해 아래와 위의 길이를 재서 모듈의 길이를 나눠서 들어갈수 있는 갯수가 동일하면 가운데로 정렬 시킨다 if (flowLines.left.type === 'curve' && flowLines.right.type === 'curve') { startPointX = flowLines.left.x1 + (calcAreaWidth - totalModuleWidthCount * width) / 2 + + if (flowLines.left.x1 < flowLines.bottom.x1) { + startPointX = flowLines.left.x1 + } } let heightMargin = 0 @@ -948,7 +953,7 @@ export function useModuleBasicSetting(tabNum) { let isInstall = false for (let i = 0; i < moduleMaxRows; i++) { - let moduleY = flowLines.bottom.y1 - height * i - 0.1 //살짝 여유를 준다 + let moduleY = flowLines.bottom.y1 - height * i - 1 //살짝 여유를 준다 //두번째 모듈 -> 혼합일 경우의 설치될 모듈 높이를 계산 if (moduleIndex > 0) { @@ -964,7 +969,7 @@ export function useModuleBasicSetting(tabNum) { heightMargin = i === 0 ? 0 : intvVer * i for (let j = 0; j < totalModuleWidthCount; j++) { - let moduleX = startPointX + width * j + 0.1 //5정도 마진을 준다 + let moduleX = startPointX + width * j + 1 //5정도 마진을 준다 widthMargin = j === 0 ? 0 : intvHor * j // 가로 마진값 chidoriLength = 0 //치도리가 아니여도 기본값을 5정도 준다 if (isChidori && !isMaxSetup) { @@ -1024,9 +1029,9 @@ export function useModuleBasicSetting(tabNum) { // } } else { //디버깅용 - // tempModule.set({ fill: 'transparent', stroke: 'red', strokeWidth: 1 }) - // canvas?.add(tempModule) - // canvas.renderAll() + tempModule.set({ fill: 'transparent', stroke: 'red', strokeWidth: 1 }) + canvas?.add(tempModule) + canvas.renderAll() } } if (isInstall) { @@ -1893,13 +1898,13 @@ export function useModuleBasicSetting(tabNum) { // } } else { //디버깅용 - // tempModule.set({ fill: 'transparent', stroke: 'red', strokeWidth: 1 }) - // canvas?.add(tempModule) - // canvas.renderAll() + tempModule.set({ fill: 'transparent', stroke: 'red', strokeWidth: 1 }) + canvas?.add(tempModule) + canvas.renderAll() } } - installedLastHeightCoord = moduleY + height + heightMargin + installedLastHeightCoord = moduleY - width - heightMargin if (isInstall) { ++installedModuleHeightCount @@ -2462,7 +2467,7 @@ export function useModuleBasicSetting(tabNum) { let moduleOptions = { fill: '#BFFD9F', stroke: 'black', - strokeWidth: 0.1, + strokeWidth: 0.3, selectable: true, // 선택 가능하게 설정 lockMovementX: true, // X 축 이동 잠금 lockMovementY: true, // Y 축 이동 잠금 @@ -2897,7 +2902,7 @@ export function useModuleBasicSetting(tabNum) { let moduleOptions = { fill: '#BFFD9F', stroke: 'black', - strokeWidth: 0.1, + strokeWidth: 0.3, selectable: true, // 선택 가능하게 설정 lockMovementX: true, // X 축 이동 잠금 lockMovementY: true, // Y 축 이동 잠금