From 8dbdc8d6440517f1738f4cae7ccac71328fe0608 Mon Sep 17 00:00:00 2001 From: yjnoh Date: Mon, 16 Dec 2024 13:54:54 +0900 Subject: [PATCH] =?UTF-8?q?=EC=88=98=EB=8F=99=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=EC=9E=91=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/module/useModuleBasicSetting.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/hooks/module/useModuleBasicSetting.js b/src/hooks/module/useModuleBasicSetting.js index fea7dbf8..9017fc96 100644 --- a/src/hooks/module/useModuleBasicSetting.js +++ b/src/hooks/module/useModuleBasicSetting.js @@ -227,7 +227,7 @@ export function useModuleBasicSetting() { tempModule = new fabric.Rect({ fill: 'white', stroke: 'black', - strokeWidth: 1, + strokeWidth: 0.3, width: width, height: height, left: mousePoint.x - width / 2, @@ -1600,7 +1600,7 @@ export function useModuleBasicSetting() { const mousePoint = canvas.getPointer(e.e) for (let i = 0; i < moduleSetupSurfaces.length; i++) { - turfPolygon = polygonToTurfPolygon(moduleSetupSurfaces[i]) + turfPolygon = polygonToTurfPolygon(moduleSetupSurfaces[i], true) trestlePolygon = moduleSetupSurfaces[i] manualDrawModules = moduleSetupSurfaces[i].modules // 앞에서 자동으로 했을때 추가됨 flowDirection = moduleSetupSurfaces[i].flowDirection //도형의 방향 @@ -1625,7 +1625,7 @@ export function useModuleBasicSetting() { tempModule = new fabric.Rect({ fill: 'white', stroke: 'black', - strokeWidth: 1, + strokeWidth: 0.3, width: width, height: height, left: mousePoint.x - width / 2, @@ -1831,8 +1831,6 @@ export function useModuleBasicSetting() { //마우스 클릭시 set으로 해당 위치에 셀을 넣음 const isOverlap = manualDrawModules.some((module) => turf.booleanOverlap(tempTurfModule, polygonToTurfPolygon(module))) //겹치는지 확인 if (!isOverlap) { - console.log('tempModule.points', tempModule.points) - let manualModule = new QPolygon(tempModule.points, { ...moduleOptions }) canvas?.add(manualModule) manualDrawModules.push(tempModule) @@ -2234,8 +2232,8 @@ export function useModuleBasicSetting() { let isDisjoint = checkModuleDisjointObjects(module.turfPoints, containsBatchObjects) if (!(disjointFromTrestle && isDisjoint)) { - canvas?.remove(module) - // module.set({ fill: 'rgba(255,190,41, 0.4)', stroke: 'black', strokeWidth: 1 }) + // canvas?.remove(module) + module.set({ fill: 'rgba(255,190,41, 0.4)', stroke: 'black', strokeWidth: 1 }) return false } else { return module