Skip to content

Commit

Permalink
Update lighthouse-treemap/app/src/main.js
Browse files Browse the repository at this point in the history
Co-authored-by: Connor Clark <cjamcl@google.com>
  • Loading branch information
paulirish and connorjclark committed May 18, 2021
1 parent 03a58f2 commit 14acb07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lighthouse-treemap/app/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ class TreemapViewer {

node.dom.style.backgroundColor = depthOneNodeColor;

// Set a bicolor background to communicate unused-bytes
// Shade the element to communicate coverage.
if (this.currentViewMode.id === 'unused-bytes') {
const pctUsed = (1 - (node.unusedBytes || 0) / node.resourceBytes) * 100;
node.dom.style.setProperty('--pctUsed', `${pctUsed}%`);
Expand Down

0 comments on commit 14acb07

Please sign in to comment.