alert => swal로 변경 및 주석 추가
This commit is contained in:
parent
e38e9cee46
commit
faf0ab2365
@ -53,7 +53,7 @@ export const useTrestle = () => {
|
|||||||
}
|
}
|
||||||
const construction = moduleSelectionData?.roofConstructions?.find((construction) => construction.roofIndex === roofMaterialIndex).construction
|
const construction = moduleSelectionData?.roofConstructions?.find((construction) => construction.roofIndex === roofMaterialIndex).construction
|
||||||
if (!construction) {
|
if (!construction) {
|
||||||
alert('앞에서 셋팅 안됨')
|
swalFire({ text: 'construction 존재안함', icon: 'error' })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,6 +78,7 @@ export const useTrestle = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 모듈들의 centerPoint들을 이용해 각 모듈의 정보(가장 아랫라인 모듈, 가장 윗라인 모듈, 접면, 반접면 등 계산)
|
||||||
const result = calculateForApi(surface)
|
const result = calculateForApi(surface)
|
||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
@ -122,11 +123,10 @@ export const useTrestle = () => {
|
|||||||
rightExposedHalfBottomPoints.length > 0 ||
|
rightExposedHalfBottomPoints.length > 0 ||
|
||||||
leftExposedHalfTopModules.length > 0 ||
|
leftExposedHalfTopModules.length > 0 ||
|
||||||
rightExposedHalfTopPoints.length > 0
|
rightExposedHalfTopPoints.length > 0
|
||||||
|
|
||||||
surface.isChidory = isChidory
|
surface.isChidory = isChidory
|
||||||
|
|
||||||
if (plvrYn === 'N' && isChidory) {
|
if (plvrYn === 'N' && isChidory) {
|
||||||
alert('치조불가공법입니다.')
|
swalFire({ text: '치조불가공법입니다.', icon: 'error' })
|
||||||
clear()
|
clear()
|
||||||
throw new Error('치조불가공법입니다.')
|
throw new Error('치조불가공법입니다.')
|
||||||
}
|
}
|
||||||
@ -732,6 +732,7 @@ export const useTrestle = () => {
|
|||||||
return { itemList, northArrangement, roofSurfaceList, circuitItemList }
|
return { itemList, northArrangement, roofSurfaceList, circuitItemList }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 발전 시뮬레이션 용 각도 재계산
|
||||||
const getAzimuth = (parent) => {
|
const getAzimuth = (parent) => {
|
||||||
const { moduleCompass, surfaceCompass, direction } = parent
|
const { moduleCompass, surfaceCompass, direction } = parent
|
||||||
|
|
||||||
@ -796,6 +797,7 @@ export const useTrestle = () => {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 북면설치가 한개라도 되어있는지 확인
|
||||||
const getNorthArrangement = () => {
|
const getNorthArrangement = () => {
|
||||||
const surfaces = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE)
|
const surfaces = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE)
|
||||||
let northArrangement = '0'
|
let northArrangement = '0'
|
||||||
@ -814,6 +816,7 @@ export const useTrestle = () => {
|
|||||||
return northArrangement
|
return northArrangement
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 다음 윗 모듈을 찾는다.
|
||||||
const findNextModule = (currentPoint, centerPoints, direction) => {
|
const findNextModule = (currentPoint, centerPoints, direction) => {
|
||||||
let { x, y, horizontal, vertical } = { ...currentPoint }
|
let { x, y, horizontal, vertical } = { ...currentPoint }
|
||||||
let { widthArr, heightArr } = centerPoints[0]
|
let { widthArr, heightArr } = centerPoints[0]
|
||||||
@ -860,6 +863,7 @@ export const useTrestle = () => {
|
|||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 다음 왼쪽 모듈을 찾는다.
|
||||||
const findNextLeftModule = (currentPoint, centerPoints, direction) => {
|
const findNextLeftModule = (currentPoint, centerPoints, direction) => {
|
||||||
let { x, y, horizontal, vertical } = { ...currentPoint }
|
let { x, y, horizontal, vertical } = { ...currentPoint }
|
||||||
let { widthArr, heightArr } = centerPoints[0]
|
let { widthArr, heightArr } = centerPoints[0]
|
||||||
@ -923,6 +927,8 @@ export const useTrestle = () => {
|
|||||||
|
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 다음 오른쪽 모듈을 찾는다.
|
||||||
const findNextRightModule = (currentPoint, centerPoints, direction) => {
|
const findNextRightModule = (currentPoint, centerPoints, direction) => {
|
||||||
let { x, y, horizontal, vertical } = { ...currentPoint }
|
let { x, y, horizontal, vertical } = { ...currentPoint }
|
||||||
let { widthArr, heightArr } = centerPoints[0]
|
let { widthArr, heightArr } = centerPoints[0]
|
||||||
@ -1357,6 +1363,7 @@ export const useTrestle = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//파라미터로 받은 배치면의 rack을 가지고 지지금구를 그린다.
|
||||||
const installBracket = (surface) => {
|
const installBracket = (surface) => {
|
||||||
const modules = surface.modules
|
const modules = surface.modules
|
||||||
const racks = []
|
const racks = []
|
||||||
@ -1555,6 +1562,7 @@ export const useTrestle = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 랙 없음의 지지금구를 그린다.
|
||||||
const drawBracketWithOutRack = (module, rackIntvlPct, count, l, direction, moduleIntvlHor, moduleIntvlVer) => {
|
const drawBracketWithOutRack = (module, rackIntvlPct, count, l, direction, moduleIntvlHor, moduleIntvlVer) => {
|
||||||
let { width, height, left, top } = module
|
let { width, height, left, top } = module
|
||||||
let startPointX
|
let startPointX
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user