From 91bf9018377842bc1f58d3b432526e9aa0aeae21 Mon Sep 17 00:00:00 2001 From: Yvan Date: Wed, 28 Oct 2020 18:53:31 +0800 Subject: [PATCH 1/4] =?UTF-8?q?REPORT-34739=20=E8=87=AA=E9=80=82=E5=BA=94?= =?UTF-8?q?=E5=B8=83=E5=B1=80=E4=B8=8B=E8=B0=83=E6=95=B4=E7=BB=9D=E5=AF=B9?= =?UTF-8?q?=E7=94=BB=E5=B8=83=E5=9D=97=E9=AB=98=E5=BA=A6,=E7=BB=9D?= =?UTF-8?q?=E5=AF=B9=E7=94=BB=E5=B8=83=E5=9D=97=E4=B9=B1=E8=B7=B3=E5=B9=B6?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=92=A4=E9=94=80=E5=8A=9F=E8=83=BD=E5=A4=B1?= =?UTF-8?q?=E6=95=88=20=E3=80=90=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0?= =?UTF-8?q?=E3=80=91=E5=9C=A8=E8=B0=83=E6=95=B4=E7=BB=9D=E5=AF=B9=E7=94=BB?= =?UTF-8?q?=E5=B8=83=E5=9D=97=E7=9A=84=E9=AB=98=E5=BA=A6=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=9B=A0=E4=B8=BA=E5=89=8D=E9=9D=A2=E5=AF=B9=E7=BB=9D=E5=AF=B9?= =?UTF-8?q?=E7=94=BB=E5=B8=83=E5=9D=97=E7=9A=84backupBounds=E5=81=9A?= =?UTF-8?q?=E4=BA=86=E5=A4=84=E7=90=86=EF=BC=8C=E5=BF=BD=E7=95=A5=E4=BA=86?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E9=9D=A2=E6=9D=BF=E5=9D=97=E9=AB=98=E5=BA=A6?= =?UTF-8?q?=E5=B8=A6=E6=9D=A5=E7=9A=84=E5=81=8F=E7=A7=BB=E9=87=8F=EF=BC=8C?= =?UTF-8?q?=E6=89=80=E4=BB=A5=E4=BC=9A=E5=AF=BC=E8=87=B4=E5=85=B6=E4=B9=B1?= =?UTF-8?q?=E8=B7=B3=E5=B9=B6=E4=B8=94=E6=92=A4=E9=94=80=E5=87=BA=E9=94=99?= =?UTF-8?q?=20=E3=80=90=E6=94=B9=E5=8A=A8=E6=96=B9=E6=A1=88=E3=80=91?= =?UTF-8?q?=E5=9C=A8com.fr.design.designer.beans.adapters.layout.FRFitLayo?= =?UTF-8?q?utAdapter.fix(com.fr.design.designer.creator.XCreator)=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E4=B8=AD=E5=8A=A0=E4=B8=AA=E5=88=A4=E6=96=AD=EF=BC=8C?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E6=98=AF=E7=BB=9D=E5=AF=B9=E7=94=BB=E5=B8=83?= =?UTF-8?q?=E5=9D=97=EF=BC=8C=E5=B0=B1=E5=B0=86=E6=BC=8F=E7=AE=97=E7=9A=84?= =?UTF-8?q?=E5=81=8F=E7=A7=BB=E9=87=8F=E5=8A=A0=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../beans/adapters/layout/FRFitLayoutAdapter.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java index 24c3a19dbc..5c5fa1518f 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java @@ -5,6 +5,7 @@ package com.fr.design.designer.beans.adapters.layout; import com.fr.design.ExtraDesignClassManager; import com.fr.design.beans.GroupModel; +import com.fr.design.designer.TargetComponent; import com.fr.design.designer.beans.ConstraintsGroupModel; import com.fr.design.designer.beans.HoverPainter; import com.fr.design.designer.beans.painters.FRFitLayoutPainter; @@ -19,7 +20,14 @@ import com.fr.design.designer.creator.cardlayout.XWCardTitleLayout; import com.fr.design.designer.creator.cardlayout.XWTabFitLayout; import com.fr.design.designer.properties.FRFitLayoutConstraints; import com.fr.design.designer.properties.FRFitLayoutPropertiesGroupModel; +import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.fun.FormWidgetOptionProvider; +import com.fr.design.mainframe.DesignerContext; +import com.fr.design.mainframe.DesignerFrame; +import com.fr.design.mainframe.FormDesigner; +import com.fr.design.mainframe.JForm; +import com.fr.design.mainframe.JTemplate; +import com.fr.design.mainframe.WidgetPropertyPane; import com.fr.design.utils.ComponentUtils; import com.fr.form.ui.LayoutBorderStyle; import com.fr.form.ui.container.WAbsoluteLayout; @@ -342,7 +350,12 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter { //拖拽组件原大小、位置 Rectangle backupBound = creator.getBackupBound(); backupBound.x -= container.getX(); - backupBound.y -= container.getY(); + // REPORT-34739 对绝对画布块的backupBound.y的调整还需要考虑一下参数面板块的高度造成的偏移 + int paraHeight = 0; + if (creator instanceof XWAbsoluteLayout) { + paraHeight = WidgetPropertyPane.getInstance().getEditingFormDesigner().getParaHeight(); + } + backupBound.y -= (container.getY() - paraHeight); //当前拖拽组件的位置 int x = creator.getX(); int y = creator.getY(); From ab1c026e2d0c243741ef1e52a0c5d1f6d23c56f7 Mon Sep 17 00:00:00 2001 From: Yvan Date: Wed, 28 Oct 2020 18:54:15 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E5=AF=BC=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/beans/adapters/layout/FRFitLayoutAdapter.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java index 5c5fa1518f..401e059755 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java @@ -5,7 +5,6 @@ package com.fr.design.designer.beans.adapters.layout; import com.fr.design.ExtraDesignClassManager; import com.fr.design.beans.GroupModel; -import com.fr.design.designer.TargetComponent; import com.fr.design.designer.beans.ConstraintsGroupModel; import com.fr.design.designer.beans.HoverPainter; import com.fr.design.designer.beans.painters.FRFitLayoutPainter; @@ -20,13 +19,7 @@ import com.fr.design.designer.creator.cardlayout.XWCardTitleLayout; import com.fr.design.designer.creator.cardlayout.XWTabFitLayout; import com.fr.design.designer.properties.FRFitLayoutConstraints; import com.fr.design.designer.properties.FRFitLayoutPropertiesGroupModel; -import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.fun.FormWidgetOptionProvider; -import com.fr.design.mainframe.DesignerContext; -import com.fr.design.mainframe.DesignerFrame; -import com.fr.design.mainframe.FormDesigner; -import com.fr.design.mainframe.JForm; -import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.WidgetPropertyPane; import com.fr.design.utils.ComponentUtils; import com.fr.form.ui.LayoutBorderStyle; From 5b5c5393469981af20ba55fac30ad80d68caecee Mon Sep 17 00:00:00 2001 From: Yvan Date: Thu, 29 Oct 2020 09:14:54 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/beans/adapters/layout/FRFitLayoutAdapter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java index 401e059755..a5ceb8bb23 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java @@ -345,7 +345,7 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter { backupBound.x -= container.getX(); // REPORT-34739 对绝对画布块的backupBound.y的调整还需要考虑一下参数面板块的高度造成的偏移 int paraHeight = 0; - if (creator instanceof XWAbsoluteLayout) { + if (creator.acceptType(XWAbsoluteLayout.class)) { paraHeight = WidgetPropertyPane.getInstance().getEditingFormDesigner().getParaHeight(); } backupBound.y -= (container.getY() - paraHeight); From 4852af659e399f4cdaff6902c9f8db41b99b28d6 Mon Sep 17 00:00:00 2001 From: Yvan Date: Thu, 29 Oct 2020 11:41:43 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E6=8D=A2?= =?UTF-8?q?=E4=B8=80=E7=A7=8D=E6=96=B9=E5=BC=8F=E8=8E=B7=E5=8F=96=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E9=9D=A2=E6=9D=BF=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../beans/adapters/layout/FRFitLayoutAdapter.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java index a5ceb8bb23..c0eb392979 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java @@ -19,7 +19,11 @@ import com.fr.design.designer.creator.cardlayout.XWCardTitleLayout; import com.fr.design.designer.creator.cardlayout.XWTabFitLayout; import com.fr.design.designer.properties.FRFitLayoutConstraints; import com.fr.design.designer.properties.FRFitLayoutPropertiesGroupModel; +import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.fun.FormWidgetOptionProvider; +import com.fr.design.mainframe.FormDesigner; +import com.fr.design.mainframe.JForm; +import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.WidgetPropertyPane; import com.fr.design.utils.ComponentUtils; import com.fr.form.ui.LayoutBorderStyle; @@ -346,7 +350,10 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter { // REPORT-34739 对绝对画布块的backupBound.y的调整还需要考虑一下参数面板块的高度造成的偏移 int paraHeight = 0; if (creator.acceptType(XWAbsoluteLayout.class)) { - paraHeight = WidgetPropertyPane.getInstance().getEditingFormDesigner().getParaHeight(); + JTemplate jTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); + if (jTemplate instanceof JForm) { + paraHeight = ((JForm) jTemplate).getFormDesign().getParaHeight(); + } } backupBound.y -= (container.getY() - paraHeight); //当前拖拽组件的位置