Skip to content

Commit

Permalink
Fixed re-compute bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Pipe-Runner committed May 30, 2023
1 parent 940f46b commit fa729b9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/EditorPanel/components/InputControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ function SimulationControls({ isDisabled }) {
const { asyncRun } = useContext(PyodideContext);

const setSimulationData = useStore((state) => state.setSimulationData);
const setAnimating = useStore((state) => state.setAnimating);

const [force, setForce] = useState(DefaultValues.force);
const [theta, setTheta] = useState(DefaultValues.theta);
Expand Down Expand Up @@ -169,6 +170,7 @@ function SimulationControls({ isDisabled }) {
}, [processedData]);

const computeSimulation = async () => {
setAnimating("stopped");
setSimulationData(null);
const code = await extractScriptText(script);

Expand Down

0 comments on commit fa729b9

Please sign in to comment.