|
|
|
@ -848,11 +848,11 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
|
|
|
|
|
|
|
|
|
|
//如果不是布局容器,直接进行对比
|
|
|
|
|
if (!(creator instanceof XLayoutContainer)) { |
|
|
|
|
x -= relativeParentX + creator.getX(); |
|
|
|
|
y -= relativeParentY + creator.getY(); |
|
|
|
|
int newX = x - relativeParentX - creator.getX(); |
|
|
|
|
int newY = y - relativeParentY - creator.getY(); |
|
|
|
|
Rectangle rect = ComponentUtils.computeVisibleRect(creator); |
|
|
|
|
// 判断是否处于交叉区域
|
|
|
|
|
if (isIntersectArea(x, y, rect)) { |
|
|
|
|
if (isIntersectArea(newX, newY, rect)) { |
|
|
|
|
return creator; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -860,7 +860,9 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
|
|
|
|
|
//如果是布局容器,从布局容器向下找
|
|
|
|
|
if (creator instanceof XLayoutContainer) { |
|
|
|
|
XCreator result = xCreatorAt(x - relativeParentX, y - relativeParentY, creator, null); |
|
|
|
|
if (result != null) return result; |
|
|
|
|
if (result != null) { |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//最后,如果组件为Tab容器中的子组件,再从Tab容器中去找
|
|
|
|
|