Commit 064b7c90 authored by Zeynep Cankara's avatar Zeynep Cankara Committed by Commit Bot

[tools][system-analyzer] Fix the color bug in Map Panel

This CL fixes the Map Panel colors. The getColor
function of Edge class was always falling to the
default color unable to show correct colors in
the timeline panel.

Change-Id: Ide13b35703a656251222f512b2b9282f9f34cc04
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2297473Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Commit-Queue: Zeynep Cankara <zcankara@google.com>
Cr-Commit-Position: refs/heads/master@{#68859}
parent b661ef25
......@@ -361,6 +361,8 @@ class V8Map {
V8Map.cache = new Map();
// ===========================================================================
class Edge {
constructor(type, name, reason, time, from, to) {
......@@ -370,8 +372,10 @@ class Edge {
this.time = time;
this.from = from;
this.to = to;
this.getColor = function(type){
switch (type) {
}
getColor() {
switch (this.type) {
case 'new':
// green
return '#aedc6e';
......@@ -393,7 +397,6 @@ class Edge {
}
// pink/violet (primary)
return '#9B6EDC';
};
}
finishSetup() {
......@@ -677,6 +680,9 @@ class Timeline {
}
}
// ===========================================================================
class Chunk {
constructor(index, start, end, items, markers) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment