This makes it easy to determine the connectivity of a node in a complex graph.
| ... | ... |
@@ -510,7 +510,9 @@ class Graph(Shape): |
| 510 | 510 |
for shape in self.shapes: |
| 511 | 511 |
shape.draw(cr) |
| 512 | 512 |
for edge in self.edges: |
| 513 |
- edge.draw(cr, highlight=(edge in highlight_items)) |
|
| 513 |
+ should_highlight = any(e in highlight_items |
|
| 514 |
+ for e in (edge, edge.src, edge.dst)) |
|
| 515 |
+ edge.draw(cr, highlight=should_highlight) |
|
| 514 | 516 |
for node in self.nodes: |
| 515 | 517 |
node.draw(cr, highlight=(node in highlight_items)) |
| 516 | 518 |
|