Merge pull request 'dev' (#524) from dev into prd-deploy
Reviewed-on: #524
This commit is contained in:
commit
0cc722eb3b
@ -38,6 +38,7 @@ export default function StepUp(props) {
|
||||
const [arrayLength, setArrayLength] = useState(3) //module-table-inner의 반복 개수
|
||||
const [pcsCheck, setPcsCheck] = useRecoilState(pcsCheckState)
|
||||
const { getPcsVoltageStepUpList, getPcsAutoRecommendList, getPcsVoltageChk, getPcsConnOptionItemList } = useMasterController()
|
||||
const [originPcsVoltageStepUpList, setOriginPcsVoltageStepUpList] = useState([])
|
||||
const canvas = useRecoilValue(canvasState)
|
||||
const selectedModules = useRecoilValue(selectedModuleState)
|
||||
const [optCodes, setOptCodes] = useState([])
|
||||
@ -96,6 +97,9 @@ export default function StepUp(props) {
|
||||
|
||||
/** PCS 승압설정 정보 SET */
|
||||
setStepUpListData(stepUpListData)
|
||||
if (originPcsVoltageStepUpList.length === 0) {
|
||||
setOriginPcsVoltageStepUpList(stepUpListData)
|
||||
}
|
||||
|
||||
/** PCS 옵션 조회 */
|
||||
// const formattedOptCodes = formatOptionCodes(res.data.optionList)
|
||||
@ -104,7 +108,6 @@ export default function StepUp(props) {
|
||||
|
||||
/** 캔버스에 회로 정보 적용 */
|
||||
// 병설일때 pcs 있으면 setSubOpsions, 없으면 setMainOptions
|
||||
console.log('stepUpListData', stepUpListData)
|
||||
let mChk = 0
|
||||
stepUpListData[0].pcsItemList.forEach((pcsItem, index) => {
|
||||
const optionList = formatOptionCodes(pcsItem.optionList)
|
||||
@ -631,7 +634,7 @@ export default function StepUp(props) {
|
||||
<div className="slope-wrap">
|
||||
<div className="circuit-overflow">
|
||||
{/* 3개일때 className = by-max */}
|
||||
{stepUpListData.map((stepUp, index) => (
|
||||
{originPcsVoltageStepUpList.map((stepUp, index) => (
|
||||
<div key={index} className={`module-table-box ${stepUp.pcsItemList.length === 3 ? 'by-max' : ''}`}>
|
||||
{stepUp?.pcsItemList.map((pcsItem, idx) => (
|
||||
<div key={idx} className="module-table-inner">
|
||||
|
||||
@ -355,6 +355,12 @@ export function useContextMenu() {
|
||||
canvas.remove(line)
|
||||
})
|
||||
|
||||
//동이동현이동
|
||||
const eaveHelpLines = canvas.getObjects().filter((obj) => obj.name === 'eaveHelpLine' && obj.parentId === currentObject.attributes.roofId)
|
||||
eaveHelpLines.forEach((line) => {
|
||||
canvas.remove(line)
|
||||
})
|
||||
|
||||
canvas.renderAll()
|
||||
},
|
||||
},
|
||||
|
||||
@ -677,8 +677,9 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
// 조건에 맞는 라인들만 필터링
|
||||
const validWallLines = [...wallLines].sort((a, b) => a.idx - b.idx).filter((wallLine, index) => wallLine.idx - 1 === index)
|
||||
|
||||
console.log('', sortRoofLines, sortWallLines, sortWallBaseLines)
|
||||
sortWallLines.length > 3 &&
|
||||
console.log('', sortRoofLines, sortWallLines, sortWallBaseLines);
|
||||
|
||||
(sortWallLines.length === sortWallBaseLines.length && sortWallBaseLines.length > 3) &&
|
||||
sortWallLines.forEach((wallLine, index) => {
|
||||
|
||||
const roofLine = sortRoofLines[index]
|
||||
@ -1056,8 +1057,8 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
|
||||
if (isStartEnd.end) {
|
||||
const moveDist = Big(wallLine.x1).minus(wallBaseLine.x1).abs().toNumber()
|
||||
const aStartY = Big(roofLine.y2).minus(moveDist).abs().toNumber()
|
||||
const bStartY = Big(wallLine.y2).minus(moveDist).abs().toNumber()
|
||||
const aStartY = Big(roofLine.y2).minus(moveDist).toNumber()
|
||||
const bStartY = Big(wallLine.y2).minus(moveDist).toNumber()
|
||||
const inLine = findLineContainingPoint(innerLines, { y: aStartY, x: roofLine.x1 })
|
||||
console.log('startLines:::::::', inLine)
|
||||
const eLineY = Big(bStartY).minus(wallLine.y2).abs().toNumber()
|
||||
@ -1167,7 +1168,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
const newPointY = Big(roofLine.y1).plus(moveDist).toNumber()
|
||||
|
||||
const pDist = Big(wallLine.y1).minus(roofLine.y1).abs().toNumber()
|
||||
const pLineX = Big(roofLine.x2).minus(0).abs().toNumber()
|
||||
const pLineX = Big(roofLine.x2).minus(0).toNumber()
|
||||
|
||||
// let idx = sortRoofLines.length < index + 1 ? 0 : index
|
||||
// const pLineY = sortRoofLines[idx + 1].y2
|
||||
@ -1243,11 +1244,11 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
}
|
||||
if (isStartEnd.end) {
|
||||
const moveDist = Big(wallLine.y1).minus(wallBaseLine.y1).abs().toNumber()
|
||||
const aStartX = Big(roofLine.x2).minus(moveDist).abs().toNumber()
|
||||
const bStartX = Big(wallLine.x2).minus(moveDist).abs().toNumber()
|
||||
const aStartX = Big(roofLine.x2).minus(moveDist).toNumber()
|
||||
const bStartX = Big(wallLine.x2).minus(moveDist).toNumber()
|
||||
const inLine = findLineContainingPoint(innerLines, { x: aStartX, y: newPEnd.y })
|
||||
console.log('startLines:::::::', inLine)
|
||||
const eLineX = Big(bStartX).minus(wallLine.x2).abs().toNumber()
|
||||
const eLineX = Big(bStartX).minus(wallLine.x2).toNumber()
|
||||
newPStart.x = roofLine.x1 //Big(newPStart.x).minus(eLineX).abs().toNumber()
|
||||
newPEnd.x = aStartX
|
||||
// let idx = sortRoofLines.length < index + 1 ? 0 : index
|
||||
@ -1303,7 +1304,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
const newPointY = Big(roofLine.y2).minus(moveDist).toNumber()
|
||||
|
||||
const pDist = Big(wallLine.y2).minus(roofLine.y2).abs().toNumber()
|
||||
const pLineX = Big(roofLine.x1).minus(0).abs().toNumber()
|
||||
const pLineX = Big(roofLine.x1).minus(0).toNumber()
|
||||
|
||||
// let idx = 0 > index - 1 ? sortRoofLines.length : index
|
||||
// const pLineY = sortRoofLines[idx - 1].y1
|
||||
@ -1330,7 +1331,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
const newPointY = Big(roofLine.y1).minus(moveDist).toNumber()
|
||||
|
||||
const pDist = Big(wallLine.y1).minus(roofLine.y1).abs().toNumber()
|
||||
const pLineX = Big(roofLine.x2).minus(0).abs().toNumber()
|
||||
const pLineX = Big(roofLine.x2).minus(0).toNumber()
|
||||
|
||||
// let idx = sortRoofLines.length < index + 1 ? 0 : index
|
||||
// const pLineY = sortRoofLines[idx + 1].y2
|
||||
@ -1353,8 +1354,8 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
console.log('bottom_out isStartEnd:::::::', isStartEnd)
|
||||
if (isStartEnd.start) {
|
||||
const moveDist = Big(wallLine.y1).minus(wallBaseLine.y1).abs().toNumber()
|
||||
const aStartX = Big(roofLine.x1).minus(moveDist).abs().toNumber()
|
||||
const bStartX = Big(wallLine.x1).minus(moveDist).abs().toNumber()
|
||||
const aStartX = Big(roofLine.x1).minus(moveDist).toNumber()
|
||||
const bStartX = Big(wallLine.x1).minus(moveDist).toNumber()
|
||||
const inLine = findLineContainingPoint(innerLines, { x: aStartX, y: roofLine.y1 })
|
||||
console.log('startLines:::::::', inLine)
|
||||
const eLineX = Big(bStartX).minus(wallLine.x1).abs().toNumber()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user