This commit is contained in:
Jaeyoung Lee 2025-07-30 10:36:33 +09:00
commit 4e14e1d5bf
7 changed files with 66 additions and 28 deletions

View File

@ -100,14 +100,11 @@ const resizeImage = async (image) => {
let finalWidth = Math.round(image.bitmap.width * scale)
let finalHeight = Math.round(image.bitmap.height * scale)
if (scale < 0.6) {
finalWidth = targetImageWidth
finalHeight = targetImageHeight
}
// 실제 리사이즈 실행
image.resize({ w: finalWidth, h: finalHeight })
if (scale >= 0.6) {
// 실제 리사이즈 실행
image.resize({ w: finalWidth, h: finalHeight })
}
//배경 이미지를 생성
const mixedImage = new Jimp({ width: convertStandardWidth, height: convertStandardHeight, color: 0xffffffff })

View File

@ -6,6 +6,7 @@ import { useRecoilValue } from 'recoil'
import { floorPlanObjectState, estimateState } from '@/store/floorPlanObjectAtom'
import { usePathname, useSearchParams } from 'next/navigation'
import { QcastContext } from '@/app/QcastProvider'
import { sessionStore } from '@/store/commonAtom'
export default function DocDownOptionPop({ planNo, setEstimatePopupOpen, docDownPopLockFlg }) {
const { setIsGlobalLoading } = useContext(QcastContext)
@ -30,7 +31,7 @@ export default function DocDownOptionPop({ planNo, setEstimatePopupOpen, docDown
// recoil
const objectRecoil = useRecoilValue(floorPlanObjectState)
const estimateRecoilState = useRecoilValue(estimateState)
const sessionState = useRecoilValue(sessionStore)
//
const handleFileDown = async () => {
const url = '/api/estimate/excel-download'
@ -67,6 +68,8 @@ export default function DocDownOptionPop({ planNo, setEstimatePopupOpen, docDown
schWeightFlg: schWeightFlg,
schDrawingFlg: defaultSchDrawingFlg,
pwrGnrSimType: 'D', //default
userId: sessionState.userId ? sessionState.userId : "",
saleStoreId: sessionState.storeId ? sessionState.storeId : "",
}
const options = { responseType: 'blob' }

View File

@ -122,12 +122,46 @@ export default function CircuitTrestleSetting({ id }) {
canvas.set({ zoom: 1 })
canvas.viewportTransform = [1, 0, 0, 1, 0, 0]
canvas.renderAll()
// roof polygon
const roofPolygons = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF)
let x, y
x = 0 //canvas.width / 2
y = 1000 //canvas.height / 2
x = canvas.width / 2
y = canvas.height / 2
/*if (roofPolygons.length > 0) {
let minX = Infinity,
minY = Infinity,
maxX = -Infinity,
maxY = -Infinity
canvas.zoomToPoint(new fabric.Point(x, y), 0.5)
roofPolygons.forEach((obj) => {
const boundingRect = obj.getBoundingRect()
minX = Math.min(minX, boundingRect.left)
minY = Math.min(minY, boundingRect.top)
maxX = Math.max(maxX, boundingRect.left + boundingRect.width)
maxY = Math.max(maxY, boundingRect.top + boundingRect.height)
})
x = (minX + maxX) / 2
y = (minY + maxY) / 2
} else {
// roof polygon
x = canvas.width / 2
y = canvas.height / 2
}
if (x > 1600) {
x = 0
y = 0
}
if (y > 1600) {
x = 0
y = 0
}*/
canvas.zoomToPoint(new fabric.Point(x, y), 0.4)
changeFontSize('lengthText', '28')
changeFontSize('circuitNumber', '28')
changeFontSize('flowText', '28')

View File

@ -232,6 +232,9 @@ export function useModuleBasicSetting(tabNum) {
//가대 상세 데이터 기준으로 모듈 설치 배치면 생성
const makeModuleInstArea = (roof, trestleDetail) => {
//지붕 객체 반환
if (!roof.pitch) {
return
}
if (tabNum == 3) {
if (!roof) {

View File

@ -30,7 +30,6 @@ import { calculateAngle } from '@/util/qpolygon-utils'
import { fabric } from 'fabric'
import { outlineDisplaySelector } from '@/store/settingAtom'
import { usePopup } from '@/hooks/usePopup'
import PropertiesSetting from '@/components/floor-plan/modal/outerlinesetting/PropertiesSetting'
import Big from 'big.js'
import RoofShapeSetting from '@/components/floor-plan/modal/roofShape/RoofShapeSetting'
import { useObject } from '@/hooks/useObject'
@ -147,7 +146,7 @@ export function useOuterLineWall(id, propertiesId) {
const mouseDown = (e) => {
let pointer = getIntersectMousePoint(e)
pointer = { x: Big(pointer.x).round(1).toNumber(), y: Big(pointer.y).round(1).toNumber() }
pointer = { x: Big(pointer.x).toNumber(), y: Big(pointer.y).toNumber() }
if (points.length === 0) {
setPoints((prev) => [...prev, pointer])

View File

@ -1164,6 +1164,8 @@ export const usePolygon = () => {
if (startFlag && endFlag) {
if (!representLines.includes(line) && line.attributes.type === LINE_TYPE.WALLLINE.EAVES) {
representLines.push(line)
} else if (!representLines.includes(line) && line.attributes.type === LINE_TYPE.WALLLINE.HIPANDGABLE) {
representLines.push(line)
}
}
})

View File

@ -150,7 +150,7 @@ $alert-color: #101010;
position: absolute;
top: 0;
left: 0;
width: 5px;
width: 15px;
height: 100%;
background-color: #000;
cursor: pointer;
@ -159,7 +159,7 @@ $alert-color: #101010;
position: absolute;
top: 0;
right: 0;
width: 5px;
width: 15px;
height: 100%;
background-color: #000;
cursor: pointer;
@ -235,7 +235,7 @@ $alert-color: #101010;
.modal-foot{
display: block;
width: 100%;
padding: 5px 0;
padding: 15px 0;
background-color: #000;
cursor: pointer;
}
@ -344,7 +344,7 @@ $alert-color: #101010;
top: 50%;
right: 0;
transform: translateY(-50%);
}
}
.input-grid{
@ -646,7 +646,7 @@ $alert-color: #101010;
.outline-wrap{
padding: 24px 0;
border-top: 1px solid #424242;
.outline-inner{
display: flex;
align-items: center;
@ -666,7 +666,7 @@ $alert-color: #101010;
.outline-form{
display: flex;
align-items: center;
span{
width: 60px;
flex: none;
@ -1311,7 +1311,7 @@ $alert-color: #101010;
width: 200px;
height: 200px;
border-radius: 50%;
.circle {
position: absolute;
width: 10px;
@ -1760,7 +1760,7 @@ $alert-color: #101010;
&::-webkit-scrollbar {
width: 2px;
background-color: transparent;
}
&::-webkit-scrollbar-thumb {
background-color: #fff;
@ -1771,7 +1771,7 @@ $alert-color: #101010;
}
}
}
}
}
}
}
@ -1945,7 +1945,7 @@ $alert-color: #101010;
min-height: 80px;
background-color: #fff;
}
}
// 치수선 설정
@ -2232,11 +2232,11 @@ $alert-color: #101010;
padding-left: 0;
padding-bottom: 5px;
}
}
}
}
}
}
}
}
}
}
.keraba-flex{
display: flex;
align-items: center;
@ -2321,7 +2321,7 @@ $alert-color: #101010;
flex-direction: column;
flex: 1;
}
.compas-table-box{
background-color: #3D3D3D;