지붕재 할당 전 지붕 옮길 시 outerLinePoints 좌표도 수정 필요
This commit is contained in:
parent
b0b87bbd66
commit
8eeff43b4c
@ -1,4 +1,4 @@
|
||||
import { useRecoilValue, useResetRecoilState } from 'recoil'
|
||||
import { useRecoilState, useRecoilValue, useResetRecoilState } from 'recoil'
|
||||
import { canvasState, currentObjectState } from '@/store/canvasAtom'
|
||||
import { selectedRoofMaterialSelector } from '@/store/settingAtom'
|
||||
import { ROOF_MATERIAL_LAYOUT } from '@/components/floor-plan/modal/placementShape/PlacementShapeSetting'
|
||||
@ -25,6 +25,7 @@ export function useRoofFn() {
|
||||
const { addPitchText } = useLine()
|
||||
const { setPolygonLinesActualSize } = usePolygon()
|
||||
const { changeCorridorDimensionText } = useText()
|
||||
const [outerLinePoints, setOuterLinePoints] = useRecoilState(outerLinePointsState)
|
||||
|
||||
//면형상 선택 클릭시 지붕 패턴 입히기
|
||||
function setSurfaceShapePattern(polygon, mode = 'onlyBorder', trestleMode = false, roofMaterial, isForceChange = false, isDisplay = false) {
|
||||
@ -263,6 +264,9 @@ export function useRoofFn() {
|
||||
const deltaX = roof.left - originalRoofLeft
|
||||
const deltaY = roof.top - originalRoofTop
|
||||
|
||||
const originOuterLinePoints = [...outerLinePoints]
|
||||
setOuterLinePoints(originOuterLinePoints.map((point) => ({ x: point.x + deltaX, y: point.y + deltaY })))
|
||||
|
||||
// Move all related objects by the delta
|
||||
allRoofObject.forEach((obj) => {
|
||||
if (obj.points !== undefined) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user