배치면 전체 삭제 시 흔적 제거
This commit is contained in:
parent
4a8ebe19af
commit
3be142b1d8
@ -1,7 +1,7 @@
|
||||
'use client'
|
||||
|
||||
import { useEffect } from 'react'
|
||||
import { useRecoilState, useRecoilValue } from 'recoil'
|
||||
import { useRecoilState, useRecoilValue, useResetRecoilState } from 'recoil'
|
||||
import { canvasState, globalPitchState } from '@/store/canvasAtom'
|
||||
import { MENU, POLYGON_TYPE } from '@/common/common'
|
||||
import { getIntersectionPoint } from '@/util/canvas-util'
|
||||
@ -18,12 +18,14 @@ import { slopeSelector } from '@/store/commonAtom'
|
||||
import { QLine } from '@/components/fabric/QLine'
|
||||
import { useRoofFn } from '@/hooks/common/useRoofFn'
|
||||
import { outerLinePointsState } from '@/store/outerLineAtom'
|
||||
import { placementShapeDrawingPointsState } from '@/store/placementShapeDrawingAtom'
|
||||
|
||||
export function useSurfaceShapeBatch({ isHidden, setIsHidden }) {
|
||||
const { getMessage } = useMessage()
|
||||
const { drawDirectionArrow } = usePolygon()
|
||||
const lengthTextFont = useRecoilValue(fontSelector('lengthText'))
|
||||
const [points, setPoints] = useRecoilState(outerLinePointsState)
|
||||
const resetOuterLinePoints = useResetRecoilState(outerLinePointsState)
|
||||
const resetPlacementShapeDrawingPoints = useResetRecoilState(placementShapeDrawingPointsState)
|
||||
|
||||
const canvas = useRecoilValue(canvasState)
|
||||
const globalPitch = useRecoilValue(globalPitchState)
|
||||
@ -692,7 +694,8 @@ export function useSurfaceShapeBatch({ isHidden, setIsHidden }) {
|
||||
type: 'confirm',
|
||||
confirmFn: () => {
|
||||
canvas.clear()
|
||||
setPoints([])
|
||||
resetOuterLinePoints()
|
||||
resetPlacementShapeDrawingPoints()
|
||||
swalFire({ text: getMessage('plan.message.delete') })
|
||||
},
|
||||
// denyFn: () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user