Skip to content
Snippets Groups Projects
Commit e4cf78c8 authored by Loïc Correnson's avatar Loïc Correnson
Browse files

[region/ivette] fix record color

parent be2460c3
No related branches found
No related tags found
No related merge requests found
......@@ -349,7 +349,7 @@ class Builder {
// --- Edge
edge(e: Edge): void {
const { line = 'solid', head = 'arrow', tail = 'none' } = e;
const tooltip = e.title ?? e.label ?? `${e.source} -> ${e.target}`;
const tooltip = e.title ?? e.label;
if (e.aligned === true)
this
.print('{ rank=same; ')
......
......@@ -54,7 +54,7 @@ function makeRecord(
cells.push({ label, port });
});
if (offset !== sizeof)
cells.push(`#${sizeof-offset}b`);
cells.push(`#${sizeof - offset}b`);
return cells;
}
......@@ -70,11 +70,12 @@ function makeDiagram(regions: readonly Region.region[]): Diagram {
const id = `n${r.node}`;
// --- Color
const color =
!r.typed ? 'red' :
r.pointed !== undefined
? (r.writes ? 'orange' : 'yellow')
: (r.writes && r.reads) ? 'green' :
r.writes ? 'pink' : r.reads ? 'grey' : 'white';
(!r.writes && !r.reads) ? undefined :
!r.typed ? 'red' :
r.pointed !== undefined
? (r.writes ? 'orange' : 'yellow')
: (r.writes && r.reads) ? 'green' :
r.writes ? 'pink' : 'grey';
// --- Shape
const font = r.ranges.length > 0 ? 'mono' : 'sans';
const cells = makeRecord(edges, id, r.sizeof, r.ranges);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment