From 54f2e87006bd6df4018fc09b157634ed5b1af5a0 Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 30 Nov 2022 09:39:51 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-85611=20FR10=E7=BB=84=E4=BB=B6=E5=A4=8D?= =?UTF-8?q?=E7=94=A8-=E5=A4=9A=E7=BB=84=E4=BB=B6=E7=94=9F=E6=88=90?= =?UTF-8?q?=E7=9A=84=E5=A4=8D=E7=94=A8=E7=BB=84=E4=BB=B6=EF=BC=8C=E7=BB=9D?= =?UTF-8?q?=E5=AF=B9=E7=94=BB=E5=B8=83=E5=9D=97=E7=BC=A9=E5=B0=8F=E5=88=B0?= =?UTF-8?q?500*260=E7=9A=84=E5=B0=BA=E5=AF=B8=E9=99=90=E5=88=B6=E4=BA=86?= =?UTF-8?q?=EF=BC=8C=E4=BD=86=E5=86=85=E9=83=A8=E7=BB=84=E4=BB=B6=E6=B2=A1?= =?UTF-8?q?=E7=AD=89=E6=AF=94=E4=BE=8B=E7=BC=A9=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../share/ui/generate/ShareGeneratePane.java | 36 +------------------ 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareGeneratePane.java b/designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareGeneratePane.java index 99d6c556bd..65212d2143 100644 --- a/designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareGeneratePane.java +++ b/designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareGeneratePane.java @@ -65,8 +65,6 @@ public class ShareGeneratePane extends BasicPane { private static final Dimension DIALOG_SIZE = new Dimension(670, 760); private static final Dimension DIALOG_NORMAL_SIZE = new Dimension(670, 610); private static final Border DIALOG_BORDER = BorderFactory.createEmptyBorder(0, 6, 4, 6); - private static final double MAX_WIDTH = 500.0; - private static final double MAX_HEIGHT = 260.0; private JPanel mainPane = null; private ShareMainPane uploadPane = null; @@ -298,28 +296,11 @@ public class ShareGeneratePane extends BasicPane { private boolean generateModule(DefaultSharableWidget info) throws Exception { - DefaultSharableWidget transformInfo = transform(info); - ComponentGenerateInfo generateInfo = new ComponentGenerateInfo(uploadCheckbox.isSelected(), jt, paraMap, shareWidget, transformInfo); + ComponentGenerateInfo generateInfo = new ComponentGenerateInfo(uploadCheckbox.isSelected(), jt, paraMap, shareWidget, info); ComponentGeneratorCenter center = new ComponentGeneratorCenter(generateInfo); return center.generate(); } - private DefaultSharableWidget transform(DefaultSharableWidget info) { - confineSize(info); - - //先屏蔽 - //if (shareWidget instanceof AbstractBorderStyleWidget) { - // AbstractBorderStyleWidget styleWidget = (AbstractBorderStyleWidget) shareWidget; - // ExtendSharableAttrMark attrMark = styleWidget.getWidgetAttrMark(ExtendSharableAttrMark.XML_TAG); - // if (attrMark != null) { - // String shareId = attrMark.getShareId(); - // info.setId(shareId); - // } - //} - return info; - } - - @Override protected String title4PopupWindow() { return Toolkit.i18nText("Fine-Design_Share_Module_Msg"); @@ -329,19 +310,4 @@ public class ShareGeneratePane extends BasicPane { return effectItemGroups.size() > 0 ? DIALOG_SIZE : DIALOG_NORMAL_SIZE; } - - private void confineSize(DefaultSharableWidget info) { - double width = info.getWidth(); - double height = info.getHeight(); - if (width > 0 && height > 0 && (width > MAX_WIDTH || height > MAX_HEIGHT)) { - double aspectRatio = width / height; - if (width / height > MAX_WIDTH / MAX_HEIGHT) { - info.setWidth((int) MAX_WIDTH); - info.setHeight((int) (MAX_WIDTH / aspectRatio)); - } else { - info.setHeight((int) MAX_HEIGHT); - info.setWidth((int) (MAX_HEIGHT * aspectRatio)); - } - } - } }