From 4f04a011c93f0070b1595d128f7762f4a6be4926 Mon Sep 17 00:00:00 2001 From: MiniMiniFridge Date: Sat, 20 Dec 2025 01:49:21 -0600 Subject: [PATCH] Fixed bug in the interaction between store removal and stepping in the simulation. --- fass-react/src/App.jsx | 1 + fass-react/src/components/StepButton.jsx | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/fass-react/src/App.jsx b/fass-react/src/App.jsx index 302f37b..885e260 100644 --- a/fass-react/src/App.jsx +++ b/fass-react/src/App.jsx @@ -415,6 +415,7 @@ const App = () => { let simulationInstanceId = getSimulationInstanceId(); if (simulationInstanceId) { loadHouseholds(simulationInstanceId); + loadStores(simulationInstanceId); } }, [stepNumber]); diff --git a/fass-react/src/components/StepButton.jsx b/fass-react/src/components/StepButton.jsx index 003f16c..03509ce 100644 --- a/fass-react/src/components/StepButton.jsx +++ b/fass-react/src/components/StepButton.jsx @@ -20,6 +20,12 @@ const StepButton = ({updateStepNumber}) => { throw new Error('Network response was not ok'); } console.log(response.data); + + // reset highlight state + window.storeMarkers?.forEach(marker => { + marker.isHighlighted = false; + }); + updateStepNumber(getSimulationStep() + 1); setLoading(false) })