Merge branch 'qcast-pub' into dev
This commit is contained in:
commit
f2ea05f69e
@ -28,6 +28,7 @@ import {
|
||||
import { useCanvasPopupStatusController } from '@/hooks/common/useCanvasPopupStatusController'
|
||||
import { useCanvasSetting } from '@/hooks/option/useCanvasSetting'
|
||||
import { useCanvasMenu } from '@/hooks/common/useCanvasMenu'
|
||||
import { useEvent } from '@/hooks/useEvent'
|
||||
|
||||
export default function CanvasFrame() {
|
||||
const canvasRef = useRef(null)
|
||||
@ -49,6 +50,7 @@ export default function CanvasFrame() {
|
||||
const { handleModuleSelectionTotal } = useCanvasPopupStatusController()
|
||||
const { fetchBasicSettings } = useCanvasSetting()
|
||||
const { setSelectedMenu } = useCanvasMenu()
|
||||
const { initEvent } = useEvent()
|
||||
|
||||
const loadCanvas = () => {
|
||||
if (!canvas) return
|
||||
@ -64,6 +66,7 @@ export default function CanvasFrame() {
|
||||
if (canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE).length > 0) {
|
||||
setSelectedMenu('module')
|
||||
}
|
||||
initEvent()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@ export default function FloorPlan({ children }) {
|
||||
|
||||
const { closeAll } = usePopup()
|
||||
const { selectedMenu, setSelectedMenu } = useCanvasMenu()
|
||||
const { fetchSettings } = useCanvasSetting()
|
||||
const { fetchSettings } = useCanvasSetting(false)
|
||||
const resetCurrentMenu = useResetRecoilState(currentMenuState)
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
|
||||
@ -503,19 +503,25 @@ export default function CircuitTrestleSetting({ id }) {
|
||||
// 닫기 버튼 클릭 시 처리하는 함수 추가
|
||||
const handleClose = () => {
|
||||
// // 회로 번호 텍스트 제거
|
||||
// const circuitTexts = canvas.getObjects().filter((obj) => obj.name === 'circuitNumber')
|
||||
// canvas.remove(...circuitTexts)
|
||||
// // 모듈의 회로 정보 초기화
|
||||
// canvas
|
||||
// .getObjects()
|
||||
// .filter((obj) => obj.name === POLYGON_TYPE.MODULE)
|
||||
// .forEach((obj) => {
|
||||
// obj.circuit = null
|
||||
// obj.pcsItemId = null
|
||||
// obj.circuitNumber = null
|
||||
// })
|
||||
if (
|
||||
canvas
|
||||
.getObjects()
|
||||
.filter((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE)
|
||||
.some((surface) => !surface.isComplete)
|
||||
) {
|
||||
canvas.remove(...canvas.getObjects().filter((obj) => obj.name === 'circuitNumber'))
|
||||
canvas
|
||||
.getObjects()
|
||||
.filter((obj) => obj.name === POLYGON_TYPE.MODULE)
|
||||
.forEach((obj) => {
|
||||
obj.circuit = null
|
||||
obj.pcsItemId = null
|
||||
obj.circuitNumber = null
|
||||
})
|
||||
|
||||
canvas.renderAll()
|
||||
}
|
||||
|
||||
// canvas.renderAll()
|
||||
closePopup(id)
|
||||
}
|
||||
|
||||
|
||||
@ -226,7 +226,7 @@ export function useModule() {
|
||||
}
|
||||
|
||||
modules.forEach((module) => {
|
||||
const { top, left } = getPosotion(module, direction, Number(length) + Number(moduleLength), false)
|
||||
const { top, left } = getPosotion(module, direction, Number(length) + Number(moduleLength), true)
|
||||
module.clone((obj) => {
|
||||
obj.set({
|
||||
parentId: module.parentId,
|
||||
@ -677,6 +677,7 @@ export function useModule() {
|
||||
}
|
||||
let width = -1
|
||||
let isWarning = false
|
||||
const { moduleIntvlHor, moduleIntvlVer } = moduleSetupSurface.trestleDetail
|
||||
if (targetModules.length === 0) {
|
||||
swalFire({
|
||||
title: '마지막 모듈입니다.',
|
||||
@ -706,7 +707,7 @@ export function useModule() {
|
||||
canvas.renderAll()
|
||||
otherModules = getOtherModules(columnModules)
|
||||
columnModules.forEach((module) => {
|
||||
const { top, left } = getPosotion(module, type, module.width, true)
|
||||
const { top, left } = getPosotion(module, type, module.width + moduleIntvlHor, true)
|
||||
let copyModule = null
|
||||
module.clone((obj) => {
|
||||
obj.set({
|
||||
@ -803,11 +804,12 @@ export function useModule() {
|
||||
}
|
||||
let height = -1
|
||||
let isWarning = false
|
||||
const { moduleIntvlHor, moduleIntvlVer } = moduleSetupSurface.trestleDetail
|
||||
canvas.discardActiveObject()
|
||||
targetModules.forEach((module) => {
|
||||
if (height === -1)
|
||||
height = type === MODULE_INSERT_TYPE.TOP ? Number(activeModule.top) - Number(module.top) : Number(module.top) - Number(activeModule.top)
|
||||
const { top, left } = getPosotion(module, type, activeModule.height, true)
|
||||
const { top, left } = getPosotion(module, type, activeModule.height + moduleIntvlVer, true)
|
||||
module.originPos = {
|
||||
left: module.left,
|
||||
top: module.top,
|
||||
@ -823,7 +825,7 @@ export function useModule() {
|
||||
canvas.renderAll()
|
||||
otherModules = getOtherModules(rowModules)
|
||||
rowModules.forEach((module) => {
|
||||
const { top, left } = getPosotion(module, type, activeModule.height, true)
|
||||
const { top, left } = getPosotion(module, type, activeModule.height + moduleIntvlVer, true)
|
||||
let copyModule = null
|
||||
module.clone((obj) => {
|
||||
obj.set({
|
||||
|
||||
@ -68,7 +68,7 @@ export function useContextMenu() {
|
||||
const { removeGrid } = useGrid()
|
||||
const { removeAdsorptionPoint } = useAdsorptionPoint()
|
||||
const commonTextFont = useRecoilValue(fontSelector('commonText'))
|
||||
const { settingsData, setSettingsDataSave } = useCanvasSetting()
|
||||
const { settingsData, setSettingsDataSave } = useCanvasSetting(false)
|
||||
const { swalFire } = useSwal()
|
||||
const { alignModule, modulesRemove, moduleRoofRemove } = useModule()
|
||||
const { removeRoofMaterial, removeAllRoofMaterial, moveRoofMaterial, removeOuterLines } = useRoofFn()
|
||||
|
||||
@ -49,7 +49,7 @@ export function usePlan(params = {}) {
|
||||
const resetOuterLinePoints = useResetRecoilState(outerLinePointsState)
|
||||
const resetPlacementShapeDrawingPoints = useResetRecoilState(placementShapeDrawingPointsState)
|
||||
|
||||
const { fetchBasicSettings, basicSettingCopySave } = useCanvasSetting()
|
||||
const { fetchBasicSettings, basicSettingCopySave } = useCanvasSetting(false)
|
||||
const [canvasSetting, setCanvasSetting] = useRecoilState(canvasSettingState)
|
||||
|
||||
/**
|
||||
|
||||
@ -293,10 +293,10 @@
|
||||
"modal.object.setting.height": "縦長",
|
||||
"modal.object.setting.area.cross": "エリア交差",
|
||||
"modal.object.setting.size.setting": "サイズ設定",
|
||||
"modal.object.setting.agreement.depth": "棟の長さ・深さ",
|
||||
"modal.object.setting.offset.depth": "出幅(深さ)",
|
||||
"modal.object.setting.agreement.depth": "棟の長さ",
|
||||
"modal.object.setting.offset.depth": "棟の出幅",
|
||||
"modal.object.setting.size.width": "幅",
|
||||
"modal.object.setting.offset.width": "出幅(幅)",
|
||||
"modal.object.setting.offset.width": "幅の出幅",
|
||||
"modal.object.setting.offset.slope": "勾配",
|
||||
"modal.object.setting.direction.select": "方向の選択",
|
||||
"modal.placement.surface.setting.info": "ⓘ①の長さ入力後、対角線長を入力すると②の長さを自動計算します。",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user