diff --git a/docs/2025-02-10_Qcell_회의.txt b/docs/2025-02-10_Qcell_회의.txt new file mode 100644 index 00000000..48224f78 --- /dev/null +++ b/docs/2025-02-10_Qcell_회의.txt @@ -0,0 +1,26 @@ +공통. 기본 폰트값 통일 -> + 1. 전체 화면 기본폰트 MS PGothic으로 통일 (폰트 기능 협의) + 2. 번역이 후짐 + +1. 지붕덮개 -> + 1-1. '외벽선 속성 설정을 완료하시겠습니까?' 문구 메시지 처리 + 1-2. 지붕재 설정 selectbox 한글로 나옴 + +2. 배치면 -> + +3. 모듈 -> + 3-1. 모듈 선택 화면 -> + 1) 서까래 간격 유지 안됨 + 2) 데이터 저장 이후 모듈 변경으로 인해 셀렉트박스의 데이터가 없을 경우 이전 데이터로 설정됨 + 3-2. 모듈 설치 -> + 1) 모듈 설치시 방향에 따른 기준 설정 문제 + +4. 회로 -> + 4-1. 회로 선택 화면 -> pcs 선택 화면 관련 시리즈 영역 width값 조정 + +5. 가대설정 -> + 5-1. 가대 그릴시 금구 위치 다름(좌,우, T01 / RA03250210002 / PLAN 1참고) + 5-2. 가대 설치 후 견적서로 넘어가는 시간이 너무 빠르다고 함 + +6. 견적서 -> + 6-1. 견적서 문서 다운로드 도면 이미지 포함 안됨 \ No newline at end of file diff --git a/src/hooks/object/useObjectBatch.js b/src/hooks/object/useObjectBatch.js index e93d4ff8..b63cdb97 100644 --- a/src/hooks/object/useObjectBatch.js +++ b/src/hooks/object/useObjectBatch.js @@ -425,7 +425,7 @@ export function useObjectBatch({ isHidden, setIsHidden }) { lockMovementY: true, // Y 축 이동 잠금 lockRotation: true, // 회전 잠금 viewLengthText: true, - direction: direction, + // direction: direction, originX: 'center', originY: 'center', name: dormerName, @@ -444,7 +444,7 @@ export function useObjectBatch({ isHidden, setIsHidden }) { lockMovementY: true, // Y 축 이동 잠금 lockRotation: true, // 회전 잠금 viewLengthText: true, - direction: direction, + // direction: direction, originX: 'center', originY: 'center', name: dormerName, @@ -462,8 +462,8 @@ export function useObjectBatch({ isHidden, setIsHidden }) { setSurfaceShapePattern(rightTriangle) //방향 - drawDirectionArrow(leftTriangle) - drawDirectionArrow(rightTriangle) + // drawDirectionArrow(leftTriangle) + // drawDirectionArrow(rightTriangle) let offsetPolygon @@ -649,7 +649,7 @@ export function useObjectBatch({ isHidden, setIsHidden }) { lockRotation: true, // 회전 잠금 viewLengthText: true, fontSize: 14, - direction: direction, + // direction: direction, originX: 'center', originY: 'center', name: dormerName, @@ -666,7 +666,7 @@ export function useObjectBatch({ isHidden, setIsHidden }) { lockRotation: true, // 회전 잠금 viewLengthText: true, fontSize: 14, - direction: direction, + // direction: direction, originX: 'center', originY: 'center', name: dormerName, @@ -680,8 +680,8 @@ export function useObjectBatch({ isHidden, setIsHidden }) { setSurfaceShapePattern(leftPentagon) setSurfaceShapePattern(rightPentagon) //방향 - drawDirectionArrow(leftPentagon) - drawDirectionArrow(rightPentagon) + // drawDirectionArrow(leftPentagon) + // drawDirectionArrow(rightPentagon) let offsetPolygon @@ -1025,6 +1025,74 @@ export function useObjectBatch({ isHidden, setIsHidden }) { } } + const copyObjectBatch = () => { + const obj = canvas.getActiveObject() + if (obj) { + let clonedObj = null + const parentSurface = canvas?.getObjects().filter((item) => item.name === POLYGON_TYPE.ROOF && item.id === obj.parentId)[0] + + obj.clone((cloned) => { + clonedObj = cloned + }) + + addCanvasMouseEventListener('mouse:move', (e) => { + const pointer = canvas?.getPointer(e.e) + if (!clonedObj) return + + canvas + .getObjects() + .filter((clonedObj) => clonedObj.name === 'clonedObj') + .forEach((clonedObj) => canvas?.remove(clonedObj)) + + clonedObj.set({ + left: pointer.x, + top: pointer.y, + name: 'clonedObj', + }) + canvas.add(clonedObj) + }) + + addCanvasMouseEventListener('mouse:up', (e) => { + //개구, 그림자 타입일 경우 폴리곤 타입 변경 + if (BATCH_TYPE.OPENING == obj.name || BATCH_TYPE.SHADOW == obj.name) { + clonedObj.set({ + points: rectToPolygon(clonedObj), + }) + + const turfSurface = pointsToTurfPolygon(parentSurface.points) + const turfObject = pointsToTurfPolygon(clonedObj.points) + + if (turf.booleanWithin(turfObject, turfSurface)) { + clonedObj.set({ + lockMovementX: true, + lockMovementY: true, + name: BATCH_TYPE.OPENING, + parentId: parentSurface.id, + }) + clonedObj.setCoords() + } else { + swalFire({ + title: getMessage('batch.object.outside.roof'), + icon: 'warning', + }) + canvas.remove(clonedObj) + } + } else { + clonedObj.set({ + lockMovementX: true, + lockMovementY: true, + name: obj.name, + }) + + if (clonedObj.type === 'group') reGroupObject(clonedObj) + clonedObj.setCoords() + } + canvas.discardActiveObject() + initEvent() + }) + } + } + const dormerOffsetKeyEvent = (setArrow1, setArrow2) => { addDocumentEventListener('keydown', document, (e) => { if (e.key === 'ArrowDown' || e.key === 'ArrowUp') { @@ -1061,5 +1129,6 @@ export function useObjectBatch({ isHidden, setIsHidden }) { moveObjectBatch, dormerOffsetKeyEvent, dormerOffset, + copyObjectBatch, } } diff --git a/src/hooks/useContextMenu.js b/src/hooks/useContextMenu.js index 577d5b2e..3ab2c566 100644 --- a/src/hooks/useContextMenu.js +++ b/src/hooks/useContextMenu.js @@ -58,7 +58,7 @@ export function useContextMenu() { const [cell, setCell] = useState(null) const [column, setColumn] = useState(null) const { handleZoomClear } = useCanvasEvent() - const { moveObjectBatch } = useObjectBatch({}) + const { moveObjectBatch, copyObjectBatch } = useObjectBatch({}) const { moveSurfaceShapeBatch } = useSurfaceShapeBatch({}) const [globalFont, setGlobalFont] = useRecoilState(globalFontAtom) const { addLine, removeLine } = useLine() @@ -470,7 +470,7 @@ export function useContextMenu() { id: 'openingCopy', shortcut: ['c', 'C'], name: `${getMessage('contextmenu.copy')}(C)`, - fn: () => copyObject(), + fn: () => copyObjectBatch(), }, { id: 'openingOffset',