Browse Source

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

Merge in DESIGN/design from ~KERRY/design_10.0:feature/x to feature/x

* commit 'abeb61ff79a006926f23ed365f74a5aedb056ec1':
  REPORT-60509【固定布局-原布局推荐4.1】拖拽复用组件到空白块,已拖入的组件会自动变化大小
research/11.0
kerry 3 years ago
parent
commit
283d38a471
  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.setContainerHeight(containerHeight);
layout.setContainerWidth(containerWidth); layout.setContainerWidth(containerWidth);
addCompInterval(getAcualInterval()); addCompInterval(getAcualInterval());
LayoutUtils.layoutContainer(this);
// REPORT-54410: 决策报表,模板中其他组件的宽高修改会影响绝对画布块中组件的宽高和位置 // REPORT-54410: 决策报表,模板中其他组件的宽高修改会影响绝对画布块中组件的宽高和位置
// 绝对布局内的组件尺寸调整需要在绝对布局的bound排除GAP后进行,否则计算出的 // 绝对布局内的组件尺寸调整需要在绝对布局的bound排除GAP后进行,否则计算出的
// 组件尺寸缩放比例会有问题 // 组件尺寸缩放比例会有问题
@ -888,7 +886,11 @@ public class XWFitLayout extends XLayoutContainer {
isRefreshing = true; isRefreshing = true;
this.remove(oldCreator); this.remove(oldCreator);
this.add(newCreator); this.add(newCreator);
this.updateBoundsWidget(); //对于新增的绝对布局的组件,需要更新下内部组件的大小
if (newCreator.acceptType(XWAbsoluteLayout.class)){
((XWAbsoluteLayout) newCreator).updateBoundsWidget();
newCreator.setBackupBound(newCreator.getBounds());
}
isRefreshing = false; isRefreshing = false;
LayoutUtils.layoutContainer(this); LayoutUtils.layoutContainer(this);
} }

Loading…
Cancel
Save