overlay: do not move snap points backwards
because WidgetOverlays in their default position render in the vanilla position it can cause other overlays to occlude previous overlays when they should not
This commit is contained in:
@@ -213,19 +213,19 @@ public class OverlayUtil
|
||||
switch (overlayPosition)
|
||||
{
|
||||
case BOTTOM_LEFT:
|
||||
sX = bounds.x + bounds.width + padding;
|
||||
sX = Math.max(sX, bounds.x + bounds.width + padding);
|
||||
break;
|
||||
case BOTTOM_RIGHT:
|
||||
sX = bounds.x - padding;
|
||||
sX = Math.min(sX, bounds.x - padding);
|
||||
break;
|
||||
case TOP_LEFT:
|
||||
case TOP_CENTER:
|
||||
case CANVAS_TOP_RIGHT:
|
||||
case TOP_RIGHT:
|
||||
sY = bounds.y + bounds.height + padding;
|
||||
sY = Math.max(sY, bounds.y + bounds.height + padding);
|
||||
break;
|
||||
case ABOVE_CHATBOX_RIGHT:
|
||||
sY = bounds.y - padding;
|
||||
sY = Math.min(sY, bounds.y - padding);
|
||||
break;
|
||||
default:
|
||||
throw new IllegalArgumentException();
|
||||
|
||||
Reference in New Issue
Block a user