Skip to content

Commit 6eed927

Browse files
Update Lib/profiling/sampling/_heatmap_assets/heatmap.js
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
1 parent 50f63d0 commit 6eed927

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

Lib/profiling/sampling/_heatmap_assets/heatmap.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -506,17 +506,14 @@ function toggleSpecView() {
506506
specViewEnabled = !specViewEnabled;
507507
const lines = document.querySelectorAll('.code-line');
508508

509-
lines.forEach(line => {
510-
if (specViewEnabled) {
509+
if (specViewEnabled) {
510+
lines.forEach(line => {
511511
const specColor = line.getAttribute('data-spec-color');
512512
line.style.background = specColor || 'transparent';
513-
} else {
514-
const bgColor = colorMode === 'self'
515-
? line.getAttribute('data-self-color') || line.getAttribute('data-bg-color')
516-
: line.getAttribute('data-cumulative-color') || line.getAttribute('data-bg-color');
517-
line.style.background = bgColor || 'transparent';
518-
}
519-
});
513+
});
514+
} else {
515+
applyLineColors();
516+
}
520517

521518
applySpanHeatColors(specViewEnabled);
522519
updateToggleUI('toggle-spec-view', specViewEnabled);

0 commit comments

Comments
 (0)