From c72bb1de5577f4dc1ba591fed5238d69778e76b6 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Mon, 24 Apr 2017 16:15:24 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=A4=8D=E7=94=A8=E8=BE=B9?= =?UTF-8?q?=E7=95=8C=E7=B2=98=E8=B4=B4=EF=BC=8C=E4=B9=8B=E5=89=8D=E8=80=83?= =?UTF-8?q?=E8=99=91=E7=9A=84=E7=89=87=E9=9D=A2=E4=BA=86=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/mainframe/FormSelectionUtils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/mainframe/FormSelectionUtils.java b/designer_form/src/com/fr/design/mainframe/FormSelectionUtils.java index 90945b1e80..7a03782c25 100644 --- a/designer_form/src/com/fr/design/mainframe/FormSelectionUtils.java +++ b/designer_form/src/com/fr/design/mainframe/FormSelectionUtils.java @@ -133,8 +133,10 @@ public class FormSelectionUtils { boolean xOut = x < 0 || x + copiedCreator.getWidth() / 2 + xoffset > container.getWidth(); boolean yOut = y < 0 || y + copiedCreator.getHeight() / 2 + yoffset > container.getHeight(); + boolean isEdge = (x - DELAY_X_Y == container.getWidth() - copiedCreator.getWidth() / 2 - xoffset) + && (y - DELAY_X_Y == container.getHeight() - copiedCreator.getHeight() / 2 - yoffset); + y = yOut ? container.getHeight() - copiedCreator.getHeight() / 2 - yoffset : y; - boolean isEdge = (x - DELAY_X_Y == container.getWidth() - copiedCreator.getWidth() / 2 - xoffset); if (xOut) { if (isEdge) { //向左偏移