Browse Source

REPORT-22806 模板自适应下块还是有叠盖 转专人服务-Winnie

bugfix/10.0
kerry 5 years ago
parent
commit
ce10940140
  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(); updateCreatorBackBound();
LayoutUtils.layoutRootContainer(container); LayoutUtils.layoutRootContainer(container);
}else{ }else{
fixAbsolute(creator, x, y); //添加到其父组件布局中的时候,要用其父组件布局添加
container.getLayoutAdapter().addBean(creator, x, y);
if (creator.shouldScaleCreator() || creator.hasTitleStyle()) { if (creator.shouldScaleCreator() || creator.hasTitleStyle()) {
addParentCreator(creator); addParentCreator(creator);
} else { } 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) { switch (position) {
case COMP_TOP: case COMP_TOP:
dim.width = maxWidth; dim.width = maxWidth;
dim.height = maxHeight / 2; dim.height = maxHeight / 2 - actualVal / 2;
finalY = yL + dim.height; finalY = yL + dim.height + actualVal;
finalH = maxHeight - dim.height; finalH = maxHeight - dim.height - actualVal;
break; break;
case COMP_BOTTOM: case COMP_BOTTOM:
dim.height = maxHeight / 2; dim.height = maxHeight / 2 - actualVal / 2;
dim.width = maxWidth; dim.width = maxWidth;
finalH = maxHeight - dim.height; finalH = maxHeight - dim.height - actualVal;
yL = yL + finalH; yL = yL + finalH + actualVal;
break; break;
case COMP_LEFT: case COMP_LEFT:
dim.width = maxWidth / 2; dim.width = maxWidth / 2 - actualVal / 2;
dim.height = maxHeight; dim.height = maxHeight;
finalX = xL + dim.width; finalX = xL + dim.width + actualVal;
finalW = maxWidth - dim.width; finalW = maxWidth - dim.width - actualVal;
break; break;
default: default:
finalW = maxWidth / 2; finalW = maxWidth / 2 - actualVal / 2;
xL = xL + finalW; xL = xL + finalW + actualVal;
dim.width = maxWidth - finalW; dim.width = maxWidth - finalW - actualVal;
dim.height = maxHeight; dim.height = maxHeight;
} }
if (isCalculateChildPos) { 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.XCreator;
import com.fr.design.designer.creator.XCreatorUtils; import com.fr.design.designer.creator.XCreatorUtils;
import com.fr.design.designer.creator.XLayoutContainer; 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.XWFitLayout;
import com.fr.design.designer.creator.cardlayout.XWCardLayout; import com.fr.design.designer.creator.cardlayout.XWCardLayout;
import com.fr.design.designer.creator.cardlayout.XWCardMainBorderLayout; import com.fr.design.designer.creator.cardlayout.XWCardMainBorderLayout;
@ -150,7 +151,7 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter {
//布局控件要先判断是不是可编辑 //布局控件要先判断是不是可编辑
XLayoutContainer topLayout = XCreatorUtils.getHotspotContainer((XCreator) comp).getTopLayout(); 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; 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; XWTabFitLayout tabLayout = (XWTabFitLayout) backUpContainer;
y = adjustY(y, tabLayout); y = adjustY(y, tabLayout);
} }
addComp(creator, x, y); //这时候应该要用计算后的父fit布局添加
this.container.getLayoutAdapter().addBean(creator, x, y);
((XWidgetCreator) creator).recalculateChildrenSize(); ((XWidgetCreator) creator).recalculateChildrenSize();
return true; return true;
} }

Loading…
Cancel
Save