Skip to content

Commit

Permalink
changing theme redraws based on mode
Browse files Browse the repository at this point in the history
  • Loading branch information
AnushaTiwari5 committed Nov 28, 2023
1 parent ae140bc commit 5796b2c
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 5796b2c

Please sign in to comment.