plan 이동 시 undo redo stack 제거
This commit is contained in:
parent
80720fef2a
commit
edf521e617
@ -31,6 +31,7 @@ import { useCanvasMenu } from './common/useCanvasMenu'
|
||||
import { QcastContext } from '@/app/QcastProvider'
|
||||
import { unescapeString } from '@/util/common-utils'
|
||||
import { useTrestle } from '@/hooks/module/useTrestle'
|
||||
import { useUndoRedo } from '@/hooks/useUndoRedo'
|
||||
|
||||
// putCanvasStatus 의 in-flight 요청 — module-scope 로 두어 usePlan() 인스턴스 간 공유.
|
||||
// 큰 fabric JSON 의 동시 PUT 이 SQL Server 데드락 victim 을 양산해 온 이력 때문에 직전 호출은 abort.
|
||||
@ -84,6 +85,8 @@ export function usePlan(params = {}) {
|
||||
//선택된 모듈 배치면 초기화
|
||||
const resetModuleSetupSurface = useResetRecoilState(moduleSetupSurfaceState)
|
||||
const { isAllComplete } = useTrestle()
|
||||
// undo/redo 스택 초기화 (플랜 전환 시 사용)
|
||||
const { clearStacks } = useUndoRedo()
|
||||
|
||||
/**
|
||||
* 마우스 포인터의 가이드라인 제거
|
||||
@ -477,6 +480,8 @@ export function usePlan(params = {}) {
|
||||
handleCurrentPlanUrl()
|
||||
// resetCurrentObject()
|
||||
resetModuleSetupSurface()
|
||||
// 플랜 전환 시 이전 플랜의 undo/redo 히스토리는 의미가 없으므로 초기화한다.
|
||||
clearStacks()
|
||||
}, [currentCanvasPlan])
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user