(checkbox)
| 1186 | } |
| 1187 | |
| 1188 | function updateCheckboxStats(checkbox) { |
| 1189 | var checked = getStoredCheckboxRefs(checkbox).size; |
| 1190 | var total = pcbdata.footprints.length - pcbdata.bom.skipped.length; |
| 1191 | var percent = checked * 100.0 / total; |
| 1192 | var td = document.getElementById("checkbox-stats-" + checkbox); |
| 1193 | td.firstChild.style.width = percent + "%"; |
| 1194 | td.lastChild.innerHTML = checked + "/" + total + " (" + Math.round(percent) + "%)"; |
| 1195 | } |
| 1196 | |
| 1197 | function constrain(number, min, max) { |
| 1198 | return Math.min(Math.max(parseInt(number), min), max); |
no test coverage detected