Skip to content

Commit 0c7b65a

Browse files
committed
Don't use bool for kicad_dnp
Fixes #431
1 parent a4f11fe commit 0c7b65a

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

InteractiveHtmlBom/ecad/kicad.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def get_footprint_fields(f):
4444
props = f.GetFieldsShownText()
4545
if "dnp" in props and props["dnp"] == "":
4646
del props["dnp"]
47-
props["kicad_dnp"] = True
47+
props["kicad_dnp"] = "DNP"
4848
return props
4949

5050
def parse_extra_data_from_pcb(self):

InteractiveHtmlBom/ecad/kicad_extra/netlistparser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def get_extra_field_data(self):
4747
ref_fields['Description'] = lib_field[1]
4848
if dnp:
4949
field_set.add('kicad_dnp')
50-
ref_fields['kicad_dnp'] = True
50+
ref_fields['kicad_dnp'] = "DNP"
5151
if fields is None:
5252
continue
5353
for f in fields:

InteractiveHtmlBom/ecad/kicad_extra/xmlparser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ def get_extra_field_data(self):
3737
for f in c.getElementsByTagName('property'):
3838
if f.attributes['name'].value == 'dnp':
3939
field_set.add('kicad_dnp')
40-
ref_fields['kicad_dnp'] = True
40+
ref_fields['kicad_dnp'] = "DNP"
4141

4242
return list(field_set), comp_dict

InteractiveHtmlBom/web/ibom.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ function netColorChangeHandler(net) {
271271

272272
function netColorRightClick(net) {
273273
return (event) => {
274-
if(event.button == 2) {
274+
if (event.button == 2) {
275275
event.preventDefault();
276276
event.stopPropagation();
277277

@@ -1157,7 +1157,7 @@ function updateCheckboxStats(checkbox) {
11571157
td.lastChild.innerHTML = checked + "/" + total + " (" + Math.round(percent) + "%)";
11581158
}
11591159

1160-
function constrain(number, min, max){
1160+
function constrain(number, min, max) {
11611161
return Math.min(Math.max(parseInt(number), min), max);
11621162
}
11631163

@@ -1183,15 +1183,15 @@ document.onkeydown = function (e) {
11831183
break;
11841184
case "ArrowLeft":
11851185
case "ArrowRight":
1186-
if (document.activeElement.type != "text"){
1186+
if (document.activeElement.type != "text") {
11871187
e.preventDefault();
11881188
let boardRotationElement = document.getElementById("boardRotation")
11891189
settings.boardRotation = parseInt(boardRotationElement.value); // degrees / 5
1190-
if (e.key == "ArrowLeft"){
1191-
settings.boardRotation += 3; // 15 degrees
1190+
if (e.key == "ArrowLeft") {
1191+
settings.boardRotation += 3; // 15 degrees
11921192
}
1193-
else{
1194-
settings.boardRotation -= 3;
1193+
else {
1194+
settings.boardRotation -= 3;
11951195
}
11961196
settings.boardRotation = constrain(settings.boardRotation, boardRotationElement.min, boardRotationElement.max);
11971197
boardRotationElement.value = settings.boardRotation

0 commit comments

Comments
 (0)