(probabilities)
| 1422 | } |
| 1423 | |
| 1424 | update(probabilities) { |
| 1425 | if (!probabilities.length) return; |
| 1426 | const maxProb = Math.max(...probabilities); |
| 1427 | probabilities.forEach((prob, index) => { |
| 1428 | const clamped = Math.max(0, Math.min(1, prob)); |
| 1429 | const entry = this.rows[index]; |
| 1430 | if (!entry) return; |
| 1431 | entry.bar.style.width = `${(clamped * 100).toFixed(1)}%`; |
| 1432 | entry.value.textContent = `${(clamped * 100).toFixed(1)}%`; |
| 1433 | if (clamped === maxProb) { |
| 1434 | entry.bar.classList.add("highest"); |
| 1435 | } else { |
| 1436 | entry.bar.classList.remove("highest"); |
| 1437 | } |
| 1438 | }); |
| 1439 | } |
| 1440 | } |
| 1441 | |
| 1442 | class NetworkInfoPanel { |
nothing calls this directly
no outgoing calls
no test coverage detected