diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java index 72bb2cb03..c6d0067c3 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java @@ -204,7 +204,8 @@ public class XWAbsoluteLayout extends XLayoutContainer { for (int index = 0, n = this.getComponentCount(); index < n; index++) { XCreator creator = (XCreator) this.getComponent(index); if (creator.toData().isAspectRatioLocked()) { - double percent = Math.min(percentW, percentH); + // 因为percentW/H是旧尺寸与新尺寸之间的比例,所以实现组件选择宽度和高度中较小的缩放比例的规则,需要使用Math.max + double percent = Math.max(percentW, percentH); percentW = percentH = percent; } BoundsWidget wgt = (BoundsWidget) layout.getBoundsWidget(creator.toData());