랙 없음의 경우 모듈 최대 단수 적용
This commit is contained in:
parent
36211f04bd
commit
8feefb0b7e
@ -1555,7 +1555,28 @@ export const useTrestle = () => {
|
||||
|
||||
//랙 없음 인 경우 지지금구 설치
|
||||
const installBracketWithOutRack = (surface, exposedBottomModules, leftExposedHalfBottomModules, rightExposedHalfBottomPoints, isChidory) => {
|
||||
let { rackQty, rackIntvlPct, moduleIntvlHor, moduleIntvlVer, lessSupFitQty, lessSupFitIntvlPct } = surface.trestleDetail
|
||||
let { rackQty, rackIntvlPct, moduleIntvlHor, moduleIntvlVer, lessSupFitQty, lessSupFitIntvlPct, moduleMaxRows } = surface.trestleDetail
|
||||
const checkList = []
|
||||
|
||||
exposedBottomModules.forEach((module) => {
|
||||
checkList.push(module.leftRows, module.rightRows, module.centerRows)
|
||||
})
|
||||
|
||||
leftExposedHalfBottomModules.forEach((module) => {
|
||||
checkList.push(module.leftRows, module.rightRows, module.centerRows)
|
||||
})
|
||||
|
||||
rightExposedHalfBottomPoints.forEach((module) => {
|
||||
checkList.push(module.leftRows, module.rightRows, module.centerRows)
|
||||
})
|
||||
const isAllCheckMaxRows = checkList.every((item) => item <= moduleMaxRows)
|
||||
|
||||
if (!isAllCheckMaxRows) {
|
||||
const msg = `段数の上限は${moduleMaxRows}段です。 上限より上の段には設置できません`
|
||||
swalFire({ title: msg, type: 'alert' })
|
||||
throw new Error('moduleMaxRows exceeded')
|
||||
}
|
||||
|
||||
rackQty = lessSupFitQty
|
||||
rackIntvlPct = lessSupFitIntvlPct
|
||||
const direction = surface.direction
|
||||
@ -1647,6 +1668,7 @@ export const useTrestle = () => {
|
||||
// 랙 없음의 지지금구를 그린다.
|
||||
const drawBracketWithOutRack = (module, rackIntvlPct, count, l, direction, moduleIntvlHor, moduleIntvlVer) => {
|
||||
const { leftFindModuleList, rightFindModuleList, centerFindModuleList } = module
|
||||
|
||||
rackIntvlPct = rackIntvlPct === 0 ? 1 : rackIntvlPct // 0인 경우 1로 변경
|
||||
rackIntvlPct = 100 / rackIntvlPct // 퍼센트로 변경
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user