Skip to content

Commit

Permalink
Recalculate compilation coloring when collapsed state changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
aardvark179 committed Oct 5, 2021
1 parent 9c1be73 commit cc8a112
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ function fg_toggle_collapse() {
} else {
zoom(fg_element_for_sample(sample_to_zoom_to));
}
fg_update_color(color_type)
}

function fg_x_for_sample(sample) {
Expand Down Expand Up @@ -417,7 +418,7 @@ function fg_reset_search() {
}

function fg_update_color(color_type) {
let iter = sample_and_children_depth_first(profileData[0]);
let iter = fg_sample_and_children_depth_first(profileData[0]);
let c = iter.next();
while (!c.done) {
let sample = c.value;
Expand All @@ -440,7 +441,11 @@ function fg_color_for_sample(color_type, sample) {
} else if (color_type == "bl") {
return color_for_name(sample.l, name_for_sample(sample));
} else if (color_type = "bc") {
return color_for_compilation(sample.i, sample.c);
if (fg_collapsed) {
return color_for_compilation(sample.ri, sample.rc);
} else {
return color_for_compilation(sample.i, sample.c);
}
}
}

Expand Down

0 comments on commit cc8a112

Please sign in to comment.