Skip to content

Commit

Permalink
Change behavior of central selector to actually use the current run i…
Browse files Browse the repository at this point in the history
…ndex. Part of #10.
  • Loading branch information
jkomoros committed Nov 15, 2021
1 parent 111ec0a commit 35b86a2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ export const selectCurrentSimulationHeight = createSelector(
//TODO: rename this
export const selectExpandedCurrentMapData = createSelector(
selectCurrentSimulation,
selectRunIndex,
selectFrameIndex,
(sim, currentIndex) => {
(sim, runIndex, frameIndex) => {
if (!sim) return null;
return sim.run(0).frame(currentIndex);
const run = sim.run(runIndex);
if (!run) return null;
return run.frame(frameIndex);
}
);

0 comments on commit 35b86a2

Please sign in to comment.