Skip to content

Commit 2c13a9a

Browse files
committed
Fix html config changes not persisting
Ain't JS wonderful...
1 parent 84c4db8 commit 2c13a9a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

InteractiveHtmlBom/web/ibom.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,27 +721,35 @@ function initDefaults() {
721721
var b = readStorage("silkscreenVisible");
722722
if (b === null) {
723723
b = config.show_silkscreen;
724+
} else {
725+
b = (b == "true");
724726
}
725727
document.getElementById("silkscreenCheckbox").checked = b;
726728
silkscreenVisible(b);
727729

728730
b = readStorage("redrawOnDrag");
729731
if (b === null) {
730732
b = config.redraw_on_drag;
733+
} else {
734+
b = (b == "true");
731735
}
732736
document.getElementById("dragCheckbox").checked = b;
733737
setRedrawOnDrag(b);
734738

735739
b = readStorage("darkmode");
736740
if (b === null) {
737741
b = config.dark_mode;
742+
} else {
743+
b = (b == "true");
738744
}
739745
document.getElementById("darkmodeCheckbox").checked = b;
740746
setDarkMode(b);
741747

742748
b = readStorage("highlightpin1");
743749
if (b === null) {
744750
b = config.highlight_pin1;
751+
} else {
752+
b = (b == "true");
745753
}
746754
document.getElementById("highlightpin1Checkbox").checked = b;
747755
setHighlightPin1(b);

0 commit comments

Comments
 (0)