Browse Source

REPORT-60509【固定布局-原布局推荐4.1】拖拽复用组件到空白块,已拖入的组件会自动变化大小

research/11.0
kerry 3 years ago
parent
commit
abeb61ff79
  1. 8
      designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java

8
designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java

@ -796,8 +796,6 @@ public class XWFitLayout extends XLayoutContainer {
layout.setContainerHeight(containerHeight);
layout.setContainerWidth(containerWidth);
addCompInterval(getAcualInterval());
LayoutUtils.layoutContainer(this);
// REPORT-54410: 决策报表,模板中其他组件的宽高修改会影响绝对画布块中组件的宽高和位置
// 绝对布局内的组件尺寸调整需要在绝对布局的bound排除GAP后进行,否则计算出的
// 组件尺寸缩放比例会有问题
@ -888,7 +886,11 @@ public class XWFitLayout extends XLayoutContainer {
isRefreshing = true;
this.remove(oldCreator);
this.add(newCreator);
this.updateBoundsWidget();
//对于新增的绝对布局的组件,需要更新下内部组件的大小
if (newCreator.acceptType(XWAbsoluteLayout.class)){
((XWAbsoluteLayout) newCreator).updateBoundsWidget();
newCreator.setBackupBound(newCreator.getBounds());
}
isRefreshing = false;
LayoutUtils.layoutContainer(this);
}

Loading…
Cancel
Save