|
|
|
@ -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()); |
|
|
|
|