From 2aca02789723fb14753e49301988390391c7e084 Mon Sep 17 00:00:00 2001 From: Doug Martin Date: Mon, 1 Apr 2024 14:20:30 -0400 Subject: [PATCH] fix: Pause + Step to use the same sequence [PT-187321098] Also fixed misspelled stepping type value. --- src/components/app.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/app.tsx b/src/components/app.tsx index 5b984e0..d27b4ea 100644 --- a/src/components/app.tsx +++ b/src/components/app.tsx @@ -10,7 +10,7 @@ import { Drawing } from "./drawing"; import "./app.scss"; -type GenerationMode = "ready" | "playing" | "paused" | "steping"; +type GenerationMode = "ready" | "playing" | "paused" | "stepping"; const AnyStartingState = "(any)"; const MaxLengthLimit = 25; @@ -233,8 +233,8 @@ export const App = () => { }, [finishAnimating, startAnimationInterval]); const handleStep = useCallback(async () => { - if (generationMode !== "steping") { - setGenerationMode("steping"); + if ((generationMode !== "stepping") && (generationMode !== "paused")) { + setGenerationMode("stepping"); await generateNewSequence(); animateCurrentSequenceIndex(); } else if (currentSequenceAnimating()) { @@ -297,7 +297,7 @@ export const App = () => {