From 89240801d5b1d94e66d95824c6d4499c8143e8fe Mon Sep 17 00:00:00 2001 From: neil Date: Tue, 2 May 2017 10:52:50 +0800 Subject: [PATCH] ct --- .../src/com/fr/design/mainframe/FormSelectionUtils.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/FormSelectionUtils.java b/designer_form/src/com/fr/design/mainframe/FormSelectionUtils.java index b288ec2029..7a03782c25 100644 --- a/designer_form/src/com/fr/design/mainframe/FormSelectionUtils.java +++ b/designer_form/src/com/fr/design/mainframe/FormSelectionUtils.java @@ -25,7 +25,6 @@ public class FormSelectionUtils { //组件重命名后缀 private static final String POSTFIX = "_c"; - private FormSelectionUtils() { } @@ -134,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) { //向左偏移