This commit is contained in:
kwai
2023-06-27 19:58:08 +08:00
parent 4968bbb5e7
commit 6995fe1476
6 changed files with 91 additions and 9 deletions

View File

@@ -126,13 +126,15 @@ namespace AIStudio.Wpf.DiagramDesigner
innerport.DataItem.ShowConnectors = true;
if (innerport.CanAttachTo(blockDesignerItemTempLink.Items.FirstOrDefault()) == true)
{
if (innerport.OnlyOneChild)
if (innerport.OnlyOneChild || innerport.Children.Count == 0)
{
innerport.BeAttachTo = true;
return innerport;
}
else
{
var childrenbounds = container.GetChildrenBounds();
innerport.BeAttachTo = true;
return innerport;
}