Skip to content

Commit

Permalink
radial: Correctly use half of the node node spacing as padding.
Browse files Browse the repository at this point in the history
  • Loading branch information
soerendomroes committed Sep 21, 2023
1 parent cfc8845 commit c2c49e4
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ public boolean overlap(final ElkNode node1, final ElkNode node2) {
double y1 = node1.getY() - spacing / 2;
double y2 = node2.getY() - spacing / 2;

double width1 = node1.getWidth() + spacing / 2;
double width2 = node2.getWidth() + spacing / 2;
double height1 = node1.getHeight() + spacing / 2;
double height2 = node2.getHeight() + spacing / 2;
double width1 = node1.getWidth() + spacing;
double width2 = node2.getWidth() + spacing;
double height1 = node1.getHeight() + spacing;
double height2 = node2.getHeight() + spacing;

if ((x1 < x2 + width2 && x2 < x1) && (y1 < y2 + height2 && y2 < y1)) {
// left upper and right lower corner overlap
Expand Down

0 comments on commit c2c49e4

Please sign in to comment.