Skip to content

Commit c29dc76

Browse files
committed
Resolve legend/color discrepancy for regular nodes
1 parent 8e4154b commit c29dc76

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/engine.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from .python import Python
88
# from .javascript import Javascript
9-
from .model import TRUNK_COLOR, LEAF_COLOR, EDGE_COLOR, Edge, Group, is_installed
9+
from .model import TRUNK_COLOR, LEAF_COLOR, EDGE_COLOR, NODE_COLOR, Edge, Group, is_installed
1010

1111
VERSION = '2.0.0'
1212

@@ -22,13 +22,13 @@
2222
Legend [shape=none, margin=0, label = <
2323
<table cellspacing="0" cellpadding="0" border="1"><tr><td>Code2flow Legend</td></tr><tr><td>
2424
<table cellspacing="0">
25-
<tr><td>Regular function</td><td width="50px"></td></tr>
25+
<tr><td>Regular function</td><td width="50px" bgcolor='%s'></td></tr>
2626
<tr><td>Trunk function (nothing calls this)</td><td bgcolor='%s'></td></tr>
2727
<tr><td>Leaf function (this calls nothing else)</td><td bgcolor='%s'></td></tr>
2828
<tr><td>Function call</td><td><font color='%s'>&#8594;</font></td></tr>
2929
</table></td></tr></table>
3030
>];
31-
}""" % (TRUNK_COLOR, LEAF_COLOR, EDGE_COLOR)
31+
}""" % (NODE_COLOR, TRUNK_COLOR, LEAF_COLOR, EDGE_COLOR)
3232

3333

3434
LANGUAGES = {

lib/model.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
TRUNK_COLOR = '#966F33'
66
LEAF_COLOR = '#6db33f'
77
EDGE_COLOR = "#cf142b"
8+
NODE_COLOR = "#cccccc"
89

910

1011
def is_installed(executable_cmd):
@@ -256,6 +257,7 @@ def to_dot(self):
256257
'name': self.name(),
257258
'shape': "rect",
258259
'style': 'rounded,filled',
260+
'fillcolor': NODE_COLOR,
259261
}
260262
if self.is_trunk:
261263
attributes['fillcolor'] = TRUNK_COLOR

0 commit comments

Comments
 (0)