Browse Source

Merge pull request #1255 in DESIGN/design from ~KERRY/design_10.0:bugfix/10.0 to bugfix/10.0

* commit 'ce109401409f58408962371e4f7e9cc85003dfcf':
  REPORT-22806	 模板自适应下块还是有叠盖 转专人服务-Winnie
bugfix/10.0
kerry 5 years ago
parent
commit
163a18140f
  1. 3
      designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java
  2. 24
      designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java
  3. 3
      designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java
  4. 3
      designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRTabFitLayoutAdapter.java

3
designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java

@ -240,7 +240,8 @@ public class FRAbsoluteLayoutAdapter extends FRBodyLayoutAdapter {
updateCreatorBackBound();
LayoutUtils.layoutRootContainer(container);
}else{
fixAbsolute(creator, x, y);
//添加到其父组件布局中的时候,要用其父组件布局添加
container.getLayoutAdapter().addBean(creator, x, y);
if (creator.shouldScaleCreator() || creator.hasTitleStyle()) {
addParentCreator(creator);
} else {

24
designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java

@ -593,26 +593,26 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter {
switch (position) {
case COMP_TOP:
dim.width = maxWidth;
dim.height = maxHeight / 2;
finalY = yL + dim.height;
finalH = maxHeight - dim.height;
dim.height = maxHeight / 2 - actualVal / 2;
finalY = yL + dim.height + actualVal;
finalH = maxHeight - dim.height - actualVal;
break;
case COMP_BOTTOM:
dim.height = maxHeight / 2;
dim.height = maxHeight / 2 - actualVal / 2;
dim.width = maxWidth;
finalH = maxHeight - dim.height;
yL = yL + finalH;
finalH = maxHeight - dim.height - actualVal;
yL = yL + finalH + actualVal;
break;
case COMP_LEFT:
dim.width = maxWidth / 2;
dim.width = maxWidth / 2 - actualVal / 2;
dim.height = maxHeight;
finalX = xL + dim.width;
finalW = maxWidth - dim.width;
finalX = xL + dim.width + actualVal;
finalW = maxWidth - dim.width - actualVal;
break;
default:
finalW = maxWidth / 2;
xL = xL + finalW;
dim.width = maxWidth - finalW;
finalW = maxWidth / 2 - actualVal / 2;
xL = xL + finalW + actualVal;
dim.width = maxWidth - finalW - actualVal;
dim.height = maxHeight;
}
if (isCalculateChildPos) {

3
designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java

@ -10,6 +10,7 @@ import com.fr.design.designer.beans.painters.FRFitLayoutPainter;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XCreatorUtils;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWAbsoluteLayout;
import com.fr.design.designer.creator.XWFitLayout;
import com.fr.design.designer.creator.cardlayout.XWCardLayout;
import com.fr.design.designer.creator.cardlayout.XWCardMainBorderLayout;
@ -150,7 +151,7 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter {
//布局控件要先判断是不是可编辑
XLayoutContainer topLayout = XCreatorUtils.getHotspotContainer((XCreator) comp).getTopLayout();
if (topLayout != null && !isMatchEdge && !topLayout.isEditable()) {
if (topLayout != null && !isMatchEdge && !topLayout.isEditable() && !topLayout.acceptType(XWAbsoluteLayout.class)) {
return false;
}

3
designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRTabFitLayoutAdapter.java

@ -74,7 +74,8 @@ public class FRTabFitLayoutAdapter extends FRFitLayoutAdapter {
XWTabFitLayout tabLayout = (XWTabFitLayout) backUpContainer;
y = adjustY(y, tabLayout);
}
addComp(creator, x, y);
//这时候应该要用计算后的父fit布局添加
this.container.getLayoutAdapter().addBean(creator, x, y);
((XWidgetCreator) creator).recalculateChildrenSize();
return true;
}

Loading…
Cancel
Save