수동 기능 작업
This commit is contained in:
parent
b7c3af0adb
commit
8dbdc8d644
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user