mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 08:14:59 +00:00
aider: Added fontsize attribute to dot.node function call in call_map() function in aider/repomap.py to make the font size of the node label scale with the size of the node.
# Context: USER: make the dot.node font scale with size ASSISTANT: To make the font scale with the size of the node, we need to modify the `dot.node` function call in the `call_map()` function in the `aider/repomap.py` file. We will add the `fontsize` attribute and set it proportional to the `size`. Here's the change: ```python aider/repomap.py <<<<<<< ORIGINAL dot.node(fname, penwidth=str(pen), width=str(size), height=str(size)) ======= fontsize = str(10 * size) dot.node(fname, penwidth=str(pen), width=str(size), height=str(size), fontsize=fontsize) >>>>>>> UPDATED ``` This will make the font size of the node label scale with the size of the node.
This commit is contained in:
parent
dc1c3e467d
commit
2a28c9453c
1 changed files with 2 additions and 1 deletions
|
@ -294,7 +294,8 @@ def call_map():
|
|||
size = (rank - min_rank) / (max_rank - min_rank)
|
||||
pen = max(10 * size, 1)
|
||||
size = 3 * size
|
||||
dot.node(fname, penwidth=str(pen), width=str(size), height=str(size))
|
||||
fontsize = str(10 * size)
|
||||
dot.node(fname, penwidth=str(pen), width=str(size), height=str(size), fontsize=fontsize)
|
||||
|
||||
max_w = max(edges.values())
|
||||
for refs, defs, data in G.edges(data=True):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue