Browse Source

Merge branch 'release/11.0' of https://code.fineres.com/scm/~bjorn/design into release/11.0

fix-lag
白岳 3 years ago
parent
commit
b3413bb3f0
  1. 33
      designer-form/src/main/java/com/fr/design/mainframe/FormSpacingLineDrawer.java

33
designer-form/src/main/java/com/fr/design/mainframe/FormSpacingLineDrawer.java

@ -137,43 +137,22 @@ public class FormSpacingLineDrawer {
GraphDrawHelper.drawString(g2d, text, labelX, labelY);
}
private boolean isSelectedParaComponent() {
return designer.getParaComponent() == selectedCreator;
}
private boolean isSelectedRootComponent() {
return designer.isRoot(selectedCreator);
}
private boolean isSelectedForm() {
return selectedCreator.getParent() == null;
}
private boolean isNeedExtendedLine(AbstractFormParallelLine[] nearestSides) {
return nearestSides[0].isVerticalCenterLineBeforeTheParallelLine(nearestSides[1]) || nearestSides[0].isVerticalCenterLineBehindTheParallelLine(nearestSides[1]);
}
private boolean isSelectedRootPane() {
// form、body、para这三个选中了,都不要画任何间距线
return isSelectedForm() || isSelectedRootComponent() || isSelectedParaComponent();
}
// 当前组件是否在参数面板里面
private boolean isCompInBody(XCreator creator) {
private boolean isComponentInBody(XCreator creator) {
XLayoutContainer container = XCreatorUtils.getHotspotContainer(creator);
return container != null && !container.acceptType(XWParameterLayout.class);
}
private boolean isSelectedCompInBody() {
return isCompInBody(selectedCreator);
}
private boolean isHoveredCompInBody() {
return isCompInBody(hoverCreator);
private boolean isSelectedComponentInBody() {
return isComponentInBody(selectedCreator);
}
private boolean isCompInBody() {
return isSelectedCompInBody() && isHoveredCompInBody();
private boolean isHoveredComponentInBody() {
return isComponentInBody(hoverCreator);
}
private boolean isBodyAbsoluteLayout() {
@ -185,7 +164,7 @@ public class FormSpacingLineDrawer {
}
private boolean isDrawSpacingLine() {
return isInAbsoluteLayout() && !isSelectedRootPane() && isCompInBody();
return isInAbsoluteLayout() && isSelectedComponentInBody() && isHoveredComponentInBody();
}
private AbstractFormParallelLine[] getNearestHorizontalSide() {

Loading…
Cancel
Save