From 584eb9f1b977e57a1635e2c8990927f0f54c0575 Mon Sep 17 00:00:00 2001 From: Alexey Alexandrov Date: Wed, 25 Sep 2024 14:56:29 -0700 Subject: [PATCH] Replace remaining tabs with spaces in stacks.js. --- internal/driver/html/stacks.js | 40 +++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/internal/driver/html/stacks.js b/internal/driver/html/stacks.js index ced7151e..c89faf19 100644 --- a/internal/driver/html/stacks.js +++ b/internal/driver/html/stacks.js @@ -262,22 +262,22 @@ function stackViewer(stacks, nodes) { // // Group represents a displayed (sub)tree. // interface Group { // name: string; // Full name of source - // src: number; // Index in stacks.Sources + // src: number; // Index in stacks.Sources // self: number; // Contribution as leaf (may be < 0 for diffs) - // sumpos: number; // Sum of |self| of positive nodes in tree (>= 0) - // sumneg: number; // Sum of |self| of negative nodes in tree (>= 0) + // sumpos: number; // Sum of |self| of positive nodes in tree (>= 0) + // sumneg: number; // Sum of |self| of negative nodes in tree (>= 0) // places: Place[]; // Stack slots that contributed to this group // } // // // Box is a rendered item. // interface Box { - // x: number; // X coordinate of top-left - // y: number; // Y coordinate of top-left - // width: number; // Width of box to display - // src: number; // Index in stacks.Sources - // sumpos: number; // From corresponding Group - // sumneg: number; // From corresponding Group - // self: number; // From corresponding Group + // x: number; // X coordinate of top-left + // y: number; // Y coordinate of top-left + // width: number; // Width of box to display + // src: number; // Index in stacks.Sources + // sumpos: number; // From corresponding Group + // sumneg: number; // From corresponding Group + // self: number; // From corresponding Group // }; function groupWidth(xscale, g) { @@ -297,14 +297,14 @@ function stackViewer(stacks, nodes) { y: y, width: width, src: g.src, - sumpos: g.sumpos, - sumneg: g.sumneg, + sumpos: g.sumpos, + sumneg: g.sumneg, self: g.self, }; displayList.push(box); if (direction > 0) { - // Leave gap on left hand side to indicate self contribution. - x += xscale*Math.abs(g.self); + // Leave gap on left hand side to indicate self contribution. + x += xscale*Math.abs(g.self); } } y += direction * ROW; @@ -354,9 +354,9 @@ function stackViewer(stacks, nodes) { groups.push(group); } if (stack.Value < 0) { - group.sumneg += -stack.Value; + group.sumneg += -stack.Value; } else { - group.sumpos += stack.Value; + group.sumpos += stack.Value; } group.self += (place.Pos == stack.Sources.length-1) ? stack.Value : 0; group.places.push(place); @@ -423,8 +423,8 @@ function stackViewer(stacks, nodes) { const delta = box.sumpos - box.sumneg; const partWidth = xscale * Math.abs(delta); if (partWidth >= MIN_WIDTH) { - r.appendChild(makeRect((delta < 0 ? 'negative' : 'positive'), - 0, 0, partWidth, ROW-1)); + r.appendChild(makeRect((delta < 0 ? 'negative' : 'positive'), + 0, 0, partWidth, ROW-1)); } } @@ -522,9 +522,9 @@ function stackViewer(stacks, nodes) { seen.add(place.Stack); const stack = stacks.Stacks[place.Stack]; if (stack.Value < 0) { - neg += -stack.Value; + neg += -stack.Value; } else { - pos += stack.Value; + pos += stack.Value; } } return [pos, neg];