From 7cc9abc8586ea9cd6226447572aec980d0b3c2aa Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 14 Aug 2020 16:30:13 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-37460=20&&=20REPORT-37526=20=E3=80=90frm?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E7=95=8C=E9=9D=A2=E6=94=AF=E6=8C=81=E7=BC=A9?= =?UTF-8?q?=E6=94=BE=E3=80=91=E6=A8=A1=E6=9D=BF=E6=94=BE=E5=A4=A7=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E7=82=B9=E5=87=BB=E6=8A=A5=E8=A1=A8=E5=9D=97=E7=BC=96?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E5=8F=8C=E5=87=BB=E6=89=8D=E8=83=BD=E7=94=9F?= =?UTF-8?q?=E6=95=88=EF=BC=8C=E7=BC=A9=E5=B0=8F=E6=A8=A1=E6=9D=BF100%?= =?UTF-8?q?=EF=BC=8C=E5=8D=95=E5=87=BB=E5=B0=B1=E5=8F=AF=E4=BB=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/EditingMouseListener.java | 16 ++++++++-------- .../java/com/fr/design/mainframe/FormArea.java | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java b/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java index 0f3af7537a..3ef72242a7 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java @@ -327,8 +327,8 @@ public class EditingMouseListener extends MouseInputAdapter { if (designer.getCursor().getType() == Cursor.HAND_CURSOR) { designer.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } // component.getParent() 是报表块所在的XWTitleLayout - int minX = button.getX() + getParentPositionX(component, 0) - designer.getArea().getHorizontalValue(); - int minY = button.getY() + getParentPositionY(component, 0) - designer.getArea().getVerticalValue(); + int minX = button.getX() + getParentPositionX(component, 0) - designer.getHorizontalScaleValue(); + int minY = button.getY() + getParentPositionY(component, 0) - designer.getVerticalScaleValue(); if (e.getX() + GAP - xElementCase.getInsets().left > minX && e.getX() - GAP - xElementCase.getInsets().left < minX + button.getWidth()) { if (e.getY() + GAP - xElementCase.getInsets().top > minY && e.getY() - GAP - xElementCase.getInsets().top < minY + button.getHeight()) { designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); @@ -342,8 +342,8 @@ public class EditingMouseListener extends MouseInputAdapter { if (component.getCoverPane() != null) { if (component.getCoverPane().getComponentCount() > 1) { JComponent button1 = (JComponent) component.getCoverPane().getComponent(1); - int minX1 = button1.getX() + getParentPositionX(component, 0) - designer.getArea().getHorizontalValue(); - int minY1 = button1.getY() + getParentPositionY(component, 0) - designer.getArea().getVerticalValue(); + int minX1 = button1.getX() + getParentPositionX(component, 0) - designer.getHorizontalScaleValue(); + int minY1 = button1.getY() + getParentPositionY(component, 0) - designer.getVerticalScaleValue(); if (e.getX() + GAP - component.getInsets().left > minX1 && e.getX() - GAP - component.getInsets().left < minX1 + button1.getWidth()) { if (e.getY() + GAP - component.getInsets().top > minY1 && e.getY() - GAP - component.getInsets().top < minY1 + button1.getHeight()) { designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); @@ -358,8 +358,8 @@ public class EditingMouseListener extends MouseInputAdapter { if (StringUtils.isEmpty(component.toData().getDescription())) { return; } - int minX1 = getParentPositionX(component, component.getX()) + component.getWidth() - ShareConstants.SHARE_EL_CONTROL_BUTTON_HW - designer.getArea().getHorizontalValue(); - int minY1 = getParentPositionY(component, component.getY()) - designer.getArea().getVerticalValue(); + int minX1 = getParentPositionX(component, component.getX()) + component.getWidth() - ShareConstants.SHARE_EL_CONTROL_BUTTON_HW - designer.getHorizontalScaleValue(); + int minY1 = getParentPositionY(component, component.getY()) - designer.getVerticalScaleValue(); if (e.getX() + GAP - component.getInsets().left > minX1 && e.getX() - GAP - component.getInsets().left < minX1 + ShareConstants.SHARE_EL_CONTROL_BUTTON_HW) { if (e.getY() + GAP - component.getInsets().top > minY1 && e.getY() - GAP - component.getInsets().top < minY1 + ShareConstants.SHARE_EL_CONTROL_BUTTON_HW) { designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); @@ -426,8 +426,8 @@ public class EditingMouseListener extends MouseInputAdapter { if (designer.getCursor().getType() == Cursor.HAND_CURSOR) { designer.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } - int minX = button.getX() + getParentPositionX(component, 0) - designer.getArea().getHorizontalValue(); - int minY = button.getY() + getParentPositionY(component, 0) - designer.getArea().getVerticalValue(); + int minX = button.getX() + getParentPositionX(component, 0) - designer.getHorizontalScaleValue(); + int minY = button.getY() + getParentPositionY(component, 0) - designer.getVerticalScaleValue(); if (e.getX() + GAP > minX && e.getX() - GAP < minX + button.getWidth()) { if (e.getY() + GAP > minY && e.getY() - GAP < minY + button.getHeight()) { designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java b/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java index 967cabd06f..f127f8ea0d 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java @@ -773,7 +773,7 @@ public class FormArea extends JComponent implements ScrollRulerComponent { heightPane.setValue(height); reCalculateHeight((int) height); } - if (designer.getRootComponent().acceptType(XWFitLayout.class) && AssistUtils.equals(slide, DEFAULT_SLIDER) ) { + if (designer.getRootComponent().acceptType(XWFitLayout.class) && AssistUtils.equals(screenValue, DEFAULT_SLIDER) ) { XWFitLayout layout = (XWFitLayout) designer.getRootComponent(); // 撤销时先refreshRoot了,此处去掉内边距再增加间隔 layout.moveContainerMargin();