Merge pull request #7555 from deathbeam/limit-only-non-snap

Limit only overlays that are not snapped
This commit is contained in:
Adam
2019-01-28 18:03:36 -05:00
committed by GitHub

View File

@@ -241,11 +241,11 @@ public class OverlayRenderer extends MouseAdapter implements KeyListener
{
location.setLocation(preferredLocation);
}
}
final Dimension realDimensions = client.getRealDimensions();
location.x = Ints.constrainToRange(location.x, 0, realDimensions.width - dimension.width);
location.y = Ints.constrainToRange(location.y, 0, realDimensions.height - dimension.height);
final Dimension realDimensions = client.getRealDimensions();
location.x = Ints.constrainToRange(location.x, 0, realDimensions.width - dimension.width);
location.y = Ints.constrainToRange(location.y, 0, realDimensions.height - dimension.height);
}
if (overlay.getPreferredSize() != null)
{