- 모듈 circuit 정보 없을때 회로 할당 안하게 수정
This commit is contained in:
parent
ca24b5531f
commit
3e16df1a87
@ -364,7 +364,7 @@ export default function StepUp(props) {
|
|||||||
// console.log('🚀 ~ handleRowClick ~ selectedData:', selectedData)
|
// console.log('🚀 ~ handleRowClick ~ selectedData:', selectedData)
|
||||||
|
|
||||||
// PCS 2개 이상 또는 첫번째 PCS 선택 시에만 실행
|
// PCS 2개 이상 또는 첫번째 PCS 선택 시에만 실행
|
||||||
if (stepUpListData[0].pcsItemList.length > 1 && mainIdx === 0) {
|
if (tempStepUpListData[0].pcsItemList.length > 1 && mainIdx === 0) {
|
||||||
// 파워컨디셔너 옵션 조회 요청 파라미터
|
// 파워컨디셔너 옵션 조회 요청 파라미터
|
||||||
const params = {
|
const params = {
|
||||||
...props.getOptYn(), // 옵션 Y/N
|
...props.getOptYn(), // 옵션 Y/N
|
||||||
@ -442,29 +442,30 @@ export default function StepUp(props) {
|
|||||||
|
|
||||||
roofSurface.moduleList.forEach((module) => {
|
roofSurface.moduleList.forEach((module) => {
|
||||||
const targetModule = canvas.getObjects().filter((obj) => obj.id === module.uniqueId)[0]
|
const targetModule = canvas.getObjects().filter((obj) => obj.id === module.uniqueId)[0]
|
||||||
if (module.circuit === '') return
|
if (module.circuit !== '' && module.circuit) {
|
||||||
const moduleCircuitText = new fabric.Text(module.circuit, {
|
const moduleCircuitText = new fabric.Text(module.circuit, {
|
||||||
left: targetModule.left + targetModule.width / 2,
|
left: targetModule.left + targetModule.width / 2,
|
||||||
top: targetModule.top + targetModule.height / 2,
|
top: targetModule.top + targetModule.height / 2,
|
||||||
fontFamily: circuitNumberText.fontFamily.value,
|
fontFamily: circuitNumberText.fontFamily.value,
|
||||||
fontWeight: circuitNumberText.fontWeight.value.toLowerCase().includes('bold') ? 'bold' : 'normal',
|
fontWeight: circuitNumberText.fontWeight.value.toLowerCase().includes('bold') ? 'bold' : 'normal',
|
||||||
fontStyle: circuitNumberText.fontWeight.value.toLowerCase().includes('italic') ? 'italic' : 'normal',
|
fontStyle: circuitNumberText.fontWeight.value.toLowerCase().includes('italic') ? 'italic' : 'normal',
|
||||||
fontSize: circuitNumberText.fontSize.value,
|
fontSize: circuitNumberText.fontSize.value,
|
||||||
fill: circuitNumberText.fontColor.value,
|
fill: circuitNumberText.fontColor.value,
|
||||||
width: targetModule.width,
|
width: targetModule.width,
|
||||||
height: targetModule.height,
|
height: targetModule.height,
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
originX: 'center',
|
originX: 'center',
|
||||||
originY: 'center',
|
originY: 'center',
|
||||||
name: 'circuitNumber',
|
name: 'circuitNumber',
|
||||||
parentId: targetModule.id,
|
parentId: targetModule.id,
|
||||||
circuitInfo: module.pcsItemId,
|
circuitInfo: module.pcsItemId,
|
||||||
visible: isDisplayCircuitNumber,
|
visible: isDisplayCircuitNumber,
|
||||||
})
|
})
|
||||||
targetModule.circuit = moduleCircuitText
|
targetModule.circuit = moduleCircuitText
|
||||||
targetModule.pcsItemId = module.pcsItemId
|
targetModule.pcsItemId = module.pcsItemId
|
||||||
targetModule.circuitNumber = module.circuit
|
targetModule.circuitNumber = module.circuit
|
||||||
canvas.add(moduleCircuitText)
|
canvas.add(moduleCircuitText)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user