MCPcopy Index your code
hub / github.com/python/cpython / toggleSpecView

Function toggleSpecView

Lib/profiling/sampling/_heatmap_assets/heatmap.js:466–489  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

464}
465
466function 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

Callers

nothing calls this directly

Calls 7

applyLineColorsFunction · 0.85
applySpanHeatColorsFunction · 0.85
updateToggleUIFunction · 0.85
buildScrollMarkerFunction · 0.85
getAttributeMethod · 0.80
getElementByIdMethod · 0.80
toggleMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…