Skip to content

Commit

Permalink
NetworkNodeCanvasVisualization: leave a whole annotationSpacing (defa…
Browse files Browse the repository at this point in the history
…ult 4px) space around icon

It is hard to justify why there should be half as much space between
between the icon and the first annotation, than between two subsequent
annotations.

In addition, the default 4px/2 = 2px is clearly to small.
Before fixing the "+32px for submodule label" bug a few commits ago,
gap used to be much larger, but now it's really just 2px.
  • Loading branch information
avarga committed Mar 27, 2024
1 parent f0058c0 commit 7a0dccf
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,10 @@ void NetworkNodeCanvasVisualization::layout()
std::vector<cFigure::Rectangle> rcs; // rectangles of annotations already positioned
std::vector<cFigure::Point> pts; // candidate points where annotations may be positioned
cFigure::Rectangle extendendSubmoduleBounds = submoduleBounds;
extendendSubmoduleBounds.x -= annotationSpacing / 2;
extendendSubmoduleBounds.y -= annotationSpacing / 2;
extendendSubmoduleBounds.width += annotationSpacing;
extendendSubmoduleBounds.height += annotationSpacing;
extendendSubmoduleBounds.x -= annotationSpacing;
extendendSubmoduleBounds.y -= annotationSpacing;
extendendSubmoduleBounds.width += 2 * annotationSpacing;
extendendSubmoduleBounds.height += 2 * annotationSpacing;
rcs.push_back(extendendSubmoduleBounds);
pts.push_back(getTopLeft(extendendSubmoduleBounds));
pts.push_back(getTopCenter(extendendSubmoduleBounds));
Expand Down

0 comments on commit 7a0dccf

Please sign in to comment.