[1054] - 혼합모듈일 경우 지지금구 설치 수정
This commit is contained in:
parent
18b7abdfd5
commit
364d79fafd
@ -441,7 +441,7 @@ export const useTrestle = () => {
|
||||
drawRacks(rightRacks, rackQty, rackIntvlPct / 3, module, direction, 'R', rackYn)
|
||||
}
|
||||
}
|
||||
module.set({ leftRows, rightRows, centerRows })
|
||||
module.set({ leftRows, rightRows, centerRows, leftFindModuleList, rightFindModuleList, centerFindModuleList })
|
||||
})
|
||||
// 왼쪽아래에 모듈이 없는 모듈들
|
||||
leftExposedHalfBottomModules.forEach((module) => {
|
||||
@ -531,7 +531,7 @@ export const useTrestle = () => {
|
||||
drawRacks(leftRacks, rackQty, rackIntvlPct, module, direction, 'L', rackYn)
|
||||
}
|
||||
|
||||
module.set({ leftRows })
|
||||
module.set({ leftRows, leftFindModuleList: findModuleList })
|
||||
})
|
||||
// 오른쪽 아래에 모듈이 없는 모듈들
|
||||
rightExposedHalfBottomPoints.forEach((module) => {
|
||||
@ -612,7 +612,7 @@ export const useTrestle = () => {
|
||||
drawRacks(rightRacks, rackQty, rackIntvlPct, module, direction, 'R', rackYn)
|
||||
}
|
||||
|
||||
module.set({ rightRows })
|
||||
module.set({ rightRows, rightFindModuleList: findModuleList })
|
||||
})
|
||||
|
||||
surface.set({ moduleRowsTotCnt: mostRowsModule })
|
||||
@ -1547,7 +1547,6 @@ export const useTrestle = () => {
|
||||
|
||||
canvas.renderAll()
|
||||
exposedBottomModules.forEach((module) => {
|
||||
canvas.renderAll()
|
||||
drawBracketWithOutRack(module, rackIntvlPct, module.leftRows + 1, 'L', surface.direction, moduleIntvlHor, moduleIntvlVer)
|
||||
drawBracketWithOutRack(module, rackIntvlPct, module.rightRows + 1, 'R', surface.direction, moduleIntvlHor, moduleIntvlVer)
|
||||
if (!isChidory && rackQty === 3) {
|
||||
@ -1627,6 +1626,8 @@ export const useTrestle = () => {
|
||||
|
||||
// 랙 없음의 지지금구를 그린다.
|
||||
const drawBracketWithOutRack = (module, rackIntvlPct, count, l, direction, moduleIntvlHor, moduleIntvlVer) => {
|
||||
const { leftFindModuleList, rightFindModuleList, centerFindModuleList } = module
|
||||
|
||||
let { width, height, left, top } = module
|
||||
let startPointX
|
||||
let startPointY
|
||||
@ -1723,6 +1724,39 @@ export const useTrestle = () => {
|
||||
}
|
||||
|
||||
for (let i = 0; i < count; i++) {
|
||||
let moduleWidth, moduleHeight
|
||||
|
||||
switch (l) {
|
||||
case 'L': {
|
||||
let leftFindModule = leftFindModuleList[i]
|
||||
if (!leftFindModule) {
|
||||
leftFindModule = leftFindModuleList[leftFindModuleList.length - 1]
|
||||
}
|
||||
moduleWidth = leftFindModule.width
|
||||
moduleHeight = leftFindModule.height
|
||||
break
|
||||
}
|
||||
case 'R': {
|
||||
let rightFindModule = rightFindModuleList[i]
|
||||
if (!rightFindModule) {
|
||||
rightFindModule = rightFindModuleList[rightFindModuleList.length - 1]
|
||||
}
|
||||
moduleWidth = rightFindModule.width
|
||||
moduleHeight = rightFindModule.height
|
||||
break
|
||||
}
|
||||
case 'C': {
|
||||
let centerFindModule = centerFindModuleList[i]
|
||||
if (!centerFindModule) {
|
||||
centerFindModule = centerFindModuleList[centerFindModuleList.length - 1]
|
||||
}
|
||||
|
||||
moduleWidth = centerFindModule.width
|
||||
moduleHeight = centerFindModule.height
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
const bracket = new fabric.Rect({
|
||||
left: startPointX,
|
||||
top: startPointY,
|
||||
@ -1739,13 +1773,13 @@ export const useTrestle = () => {
|
||||
canvas.renderAll()
|
||||
const maxIntvl = Math.max(moduleIntvlHor, moduleIntvlVer)
|
||||
if (direction === 'south') {
|
||||
startPointY -= height + maxIntvl / 10
|
||||
startPointY -= moduleHeight + maxIntvl / 10
|
||||
} else if (direction === 'north') {
|
||||
startPointY += height + maxIntvl / 10
|
||||
startPointY += moduleHeight + maxIntvl / 10
|
||||
} else if (direction === 'east') {
|
||||
startPointX -= width + maxIntvl / 10
|
||||
startPointX -= moduleWidth + maxIntvl / 10
|
||||
} else if (direction === 'west') {
|
||||
startPointX += width + maxIntvl / 10
|
||||
startPointX += moduleWidth + maxIntvl / 10
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user