fix issue undo history number input

This commit is contained in:
wass08
2026-02-10 11:00:11 +09:00
parent daf41f7da5
commit 4dd85993cb
2 changed files with 9 additions and 5 deletions
-2
View File
@@ -215,13 +215,11 @@ useScene.temporal.subscribe((state) => {
const currentPastLength = state.pastStates.length
const currentFutureLength = state.futureStates.length
// Undo: futureStates increases (state moved from past to future)
// Redo: pastStates increases while futureStates decreases (state moved from future to past)
const didUndo = currentFutureLength > prevFutureLength
const didRedo = currentPastLength > prevPastLength && currentFutureLength < prevFutureLength
if (didUndo || didRedo) {
// Use RAF to ensure all middleware and store updates are complete
requestAnimationFrame(() => {