()
| 464 | } |
| 465 | |
| 466 | function toggleSpecView() { |
| 467 | specViewEnabled = !specViewEnabled; |
| 468 | const lines = document.querySelectorAll('.code-line'); |
| 469 | |
| 470 | if (specViewEnabled) { |
| 471 | lines.forEach(line => { |
| 472 | const specColor = line.getAttribute('data-spec-color'); |
| 473 | line.style.background = specColor || 'transparent'; |
| 474 | }); |
| 475 | } else { |
| 476 | applyLineColors(); |
| 477 | } |
| 478 | |
| 479 | applySpanHeatColors(specViewEnabled); |
| 480 | updateToggleUI('toggle-spec-view', specViewEnabled); |
| 481 | |
| 482 | // Disable/enable color mode toggle based on spec view state |
| 483 | const colorModeToggle = document.getElementById('toggle-color-mode'); |
| 484 | if (colorModeToggle) { |
| 485 | colorModeToggle.classList.toggle('disabled', specViewEnabled); |
| 486 | } |
| 487 | |
| 488 | buildScrollMarker(); |
| 489 | } |
| 490 | |
| 491 | // ======================================== |
| 492 | // BYTECODE PANEL TOGGLE |
nothing calls this directly
no test coverage detected
searching dependent graphs…