복시도, 실측치 모듈 크기 수정
This commit is contained in:
parent
bb85d2ed6b
commit
3c8dbf634d
@ -72,7 +72,7 @@ export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) {
|
||||
|
||||
const placementRef = {
|
||||
isChidori: useRef('false'),
|
||||
setupLocation: useRef('center'),
|
||||
setupLocation: useRef('eaves'),
|
||||
isMaxSetup: useRef('false'),
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@ import { useState } from 'react'
|
||||
import { useRecoilState, useRecoilValue, useSetRecoilState } from 'recoil'
|
||||
import { canvasSettingState, canvasState, checkedModuleState, isManualModuleSetupState } from '@/store/canvasAtom'
|
||||
import { rectToPolygon, polygonToTurfPolygon, calculateVisibleModuleHeight, getDegreeByChon } from '@/util/canvas-util'
|
||||
import { basicSettingState, roofDisplaySelector } from '@/store/settingAtom'
|
||||
import { addedRoofsState, basicSettingState, roofDisplaySelector } from '@/store/settingAtom'
|
||||
import offsetPolygon, { calculateAngle } from '@/util/qpolygon-utils'
|
||||
import { QPolygon } from '@/components/fabric/QPolygon'
|
||||
import { moduleSetupSurfaceState, moduleIsSetupState } from '@/store/canvasAtom'
|
||||
@ -48,11 +48,9 @@ export function useModuleBasicSetting(tabNum) {
|
||||
useEffect(() => {
|
||||
// console.log('basicSetting', basicSetting)
|
||||
if (canvas) {
|
||||
canvas.selection = true
|
||||
canvas.selectionFullyContained = true
|
||||
// canvas.on('selection:created', (e) => {
|
||||
// console.log('selection:created', e.selected)
|
||||
// })
|
||||
//드래그 여부
|
||||
// canvas.selection = true
|
||||
// canvas.selectionFullyContained = true
|
||||
}
|
||||
}, [])
|
||||
|
||||
@ -191,7 +189,7 @@ export function useModuleBasicSetting(tabNum) {
|
||||
return
|
||||
}
|
||||
|
||||
let offsetLength = canvasSetting.roofSizeSet === 3 ? -90 : (trestleDetail.eaveIntvl / 10) * -1
|
||||
let offsetLength = canvasSetting.roofSizeSet === '3' ? -90 : (trestleDetail.eaveIntvl / 10) * -1
|
||||
setSurfaceShapePattern(roof, roofDisplay.column, true) //패턴 변경
|
||||
const offsetPoints = offsetPolygon(roof.points, offsetLength) //안쪽 offset
|
||||
//모듈설치영역?? 생성
|
||||
@ -401,12 +399,11 @@ export function useModuleBasicSetting(tabNum) {
|
||||
const moduleHeight = Number(checkedModule[0].shortAxis) / 10
|
||||
let tmpWidth = flowDirection === 'south' || flowDirection === 'north' ? moduleWidth : moduleHeight
|
||||
let tmpHeight = flowDirection === 'south' || flowDirection === 'north' ? moduleHeight : moduleWidth
|
||||
let { width, height } = calculateVisibleModuleHeight(
|
||||
tmpWidth,
|
||||
tmpHeight,
|
||||
getDegreeByChon(moduleSetupSurfaces[i].roofMaterial.pitch),
|
||||
flowDirection,
|
||||
) //각도 적용
|
||||
|
||||
let { width, height } =
|
||||
canvasSetting.roofSizeSet === '1'
|
||||
? calculateVisibleModuleHeight(tmpWidth, tmpHeight, getDegreeByChon(moduleSetupSurfaces[i].roofMaterial.pitch), flowDirection)
|
||||
: { width: tmpWidth, height: tmpHeight }
|
||||
|
||||
const points = [
|
||||
{ x: mousePoint.x - width / 2, y: mousePoint.y - height / 2 },
|
||||
@ -823,17 +820,16 @@ export function useModuleBasicSetting(tabNum) {
|
||||
: Number(module.longAxis)) / 10
|
||||
}
|
||||
|
||||
return calculateVisibleModuleHeight(
|
||||
tmpWidth,
|
||||
tmpHeight,
|
||||
getDegreeByChon(moduleSetupSurface.roofMaterial.pitch),
|
||||
moduleSetupSurface.flowDirection,
|
||||
) //각도 적
|
||||
console.log(canvasSetting)
|
||||
|
||||
return canvasSetting.roofSizeSet === '1'
|
||||
? calculateVisibleModuleHeight(tmpWidth, tmpHeight, getDegreeByChon(moduleSetupSurface.roofMaterial.pitch), moduleSetupSurface.flowDirection)
|
||||
: { width: tmpWidth, height: tmpHeight }
|
||||
}
|
||||
|
||||
const getFlowLines = (moduleSetupSurface, module) => {
|
||||
let flowLines = {}
|
||||
if (canvasSetting.roofSizeSet !== 3) {
|
||||
if (canvasSetting.roofSizeSet !== '3') {
|
||||
flowLines = {
|
||||
bottom: bottomTopFlowLine(moduleSetupSurface, module).find((obj) => obj.target === 'bottom'),
|
||||
top: bottomTopFlowLine(moduleSetupSurface, module).find((obj) => obj.target === 'top'),
|
||||
|
||||
@ -5,10 +5,8 @@ import { useMasterController } from '@/hooks/common/useMasterController'
|
||||
import { useCommonCode } from '@/hooks/common/useCommonCode'
|
||||
import { moduleSelectionDataState, moduleSelectionInitParamsState, selectedModuleState } from '@/store/selectedModuleOptions'
|
||||
import { isObjectNotEmpty, isEqualObjects } from '@/util/common-utils'
|
||||
import { addedRoofsState } from '@/store/settingAtom'
|
||||
|
||||
export function useModuleTabContents({ tabIndex, addRoof, setAddedRoofs, roofTab, tempModuleSelectionData, setTempModuleSelectionData }) {
|
||||
const addRoofsArray = useRecoilValue(addedRoofsState)
|
||||
const globalPitchText = useRecoilValue(pitchTextSelector) //피치 텍스트
|
||||
|
||||
const { findCommonCode } = useCommonCode()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user