Skip to content

Commit

Permalink
Bug fix for very low resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
hbitteur committed Dec 5, 2024
1 parent af6b6cc commit 76dab8c
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1363,8 +1363,7 @@ boolean isSideInSystem (Point2D pt,
Area area = system.getArea();

// Check top and bottom points of the beam side
for (int dir : new int[]
{ -1, +1 }) {
for (int dir : new int[] { -1, +1 }) {
if (!area.contains(pt.getX(), pt.getY() + (dir * (height / 2)))) {
return false;
}
Expand Down Expand Up @@ -2168,7 +2167,9 @@ public ItemParameters (Scale scale,
cornerMargin = typicalHeight * constants.cornerMarginRatio.getValue();

maxItemXGap = scale.toPixelsDouble(constants.maxItemXGap);
coreSectionWidth = scale.toPixels(constants.coreSectionWidth);

// We need at least 2 points to be able to compute the line slope
coreSectionWidth = Math.max(2, scale.toPixels(constants.coreSectionWidth));
}
}

Expand Down

0 comments on commit 76dab8c

Please sign in to comment.