Skip to content

Commit

Permalink
Fix html config changes not persisting
Browse files Browse the repository at this point in the history
Ain't JS wonderful...
  • Loading branch information
qu1ck committed Mar 19, 2019
1 parent 84c4db8 commit 2c13a9a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions InteractiveHtmlBom/web/ibom.js
Original file line number Diff line number Diff line change
Expand Up @@ -721,27 +721,35 @@ function initDefaults() {
var b = readStorage("silkscreenVisible");
if (b === null) {
b = config.show_silkscreen;
} else {
b = (b == "true");
}
document.getElementById("silkscreenCheckbox").checked = b;
silkscreenVisible(b);

b = readStorage("redrawOnDrag");
if (b === null) {
b = config.redraw_on_drag;
} else {
b = (b == "true");
}
document.getElementById("dragCheckbox").checked = b;
setRedrawOnDrag(b);

b = readStorage("darkmode");
if (b === null) {
b = config.dark_mode;
} else {
b = (b == "true");
}
document.getElementById("darkmodeCheckbox").checked = b;
setDarkMode(b);

b = readStorage("highlightpin1");
if (b === null) {
b = config.highlight_pin1;
} else {
b = (b == "true");
}
document.getElementById("highlightpin1Checkbox").checked = b;
setHighlightPin1(b);
Expand Down

0 comments on commit 2c13a9a

Please sign in to comment.