Skip to content

Commit

Permalink
Merge pull request #272 from RAIRLab/267-switching-theme-swaps-to-dra…
Browse files Browse the repository at this point in the history
…w-mode-but-says-youre-in-proof-mode

Switching theme redraws based on mode
  • Loading branch information
RyanR712 authored Nov 28, 2023
2 parents 6e61cab + d2b7521 commit 0ccb225
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Themes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* for the application from the CSS themes
*/
import {treeContext} from "./treeContext";
import {redrawTree} from "./DrawModes/DrawUtils";
import {redrawProof, redrawTree} from "./DrawModes/DrawUtils";

const themeSelector: HTMLSelectElement = <HTMLSelectElement>document.getElementById("theme-select");

Expand Down Expand Up @@ -36,7 +36,7 @@ function setTheme() {
legalColorStr = cssVar("--good-placement");
illegalColorStr = cssVar("--bad-placement");
placedColorStr = cssVar("--canvas-items");
redrawTree(treeContext.tree);
treeContext.modeState === "Draw" ? redrawTree(treeContext.tree) : redrawProof();
});
}

Expand Down

0 comments on commit 0ccb225

Please sign in to comment.