From 1304782c2ea91cda68aa6e7b66ad5257f42b421b Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 28 Aug 2020 12:57:37 +0700 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-36619=20=E6=8A=A5=E8=A1=A8=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E7=95=8C=E9=9D=A2=E6=8B=96=E9=80=89=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E9=80=89=E4=B8=AD=E6=8B=96=E9=80=89=E5=8C=BA=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/designer/beans/models/StateModel.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/models/StateModel.java b/designer-form/src/main/java/com/fr/design/designer/beans/models/StateModel.java index 1e7badb8a3..01c324a54b 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/models/StateModel.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/models/StateModel.java @@ -300,6 +300,13 @@ public class StateModel { int y = getMouseXY(e).y; Rectangle bounds = createCurrentBounds(x, y); + // 有参数面板时 要考虑下参数面板的高度影响 + int yOffset = 0; + XLayoutContainer paramComponent = designer.getParaComponent(); + if (paramComponent != null) { + yOffset = paramComponent.getHeight(); + } + bounds.y = bounds.y - yOffset; if ((x != currentX) || (y != currentY)) { ArrayList creators = getHotspotCreators(bounds, designer.getRootComponent()); From 4516b03301cd334c01c0612bbee245e2be43d044 Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 28 Aug 2020 13:02:08 +0700 Subject: [PATCH 2/2] REPORT-36619 fix --- .../java/com/fr/design/designer/beans/models/StateModel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/models/StateModel.java b/designer-form/src/main/java/com/fr/design/designer/beans/models/StateModel.java index 01c324a54b..c5150baa56 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/models/StateModel.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/models/StateModel.java @@ -306,7 +306,7 @@ public class StateModel { if (paramComponent != null) { yOffset = paramComponent.getHeight(); } - bounds.y = bounds.y - yOffset; + bounds.y = Math.max(bounds.y - yOffset, 0); if ((x != currentX) || (y != currentY)) { ArrayList creators = getHotspotCreators(bounds, designer.getRootComponent());