()
| 18 | } |
| 19 | |
| 20 | function initializeMatrixAnalysis() { |
| 21 | const matrixDropdown = document.getElementById("matrix-dropdown"); |
| 22 | const matrixData = getMatrixData(); |
| 23 | |
| 24 | if (!matrixDropdown || !matrixData) { |
| 25 | return; |
| 26 | } |
| 27 | |
| 28 | // Show the first matrix by default |
| 29 | const firstMatrixName = Object.keys(matrixData.matrices)[0]; |
| 30 | if (firstMatrixName) { |
| 31 | showMatrix(firstMatrixName); |
| 32 | matrixDropdown.value = firstMatrixName; |
| 33 | } |
| 34 | |
| 35 | // Handle dropdown changes |
| 36 | matrixDropdown.addEventListener("change", function () { |
| 37 | const selectedMatrix = this.value; |
| 38 | showMatrix(selectedMatrix); |
| 39 | }); |
| 40 | |
| 41 | // Add enhanced tooltips for matrix cells |
| 42 | setupMatrixTooltips(); |
| 43 | } |
| 44 | |
| 45 | function getMatrixData() { |
| 46 | const matrixDataElement = document.getElementById("matrix-data"); |
no test coverage detected