This commit is contained in:
艾竹
2023-06-18 16:21:18 +08:00
parent 0b0f81faac
commit af1cacc846
7 changed files with 176 additions and 218 deletions

View File

@@ -3221,7 +3221,7 @@ namespace AIStudio.Wpf.DiagramDesigner
{
if (port.GetBounds().IntersectsWith(blockDesignerItemViewModel.GetBounds())) //如果两个位置相交
{
var innerport = port.GetAllContain(port.Children, false).Where(p => p.GetBounds().IntersectsWith(blockDesignerItemViewModel.GetBounds())).OrderByDescending(p => p.ContainLevel).FirstOrDefault();
var innerport = port.GetAllContain(port.Children, false).Where(p => p.GetBounds().IntersectsWith(blockDesignerItemViewModel.GetBounds())).OrderByDescending(p => p.ContainerLevel).FirstOrDefault();
if (innerport != null)
{
innerport.DataItem.ShowConnectors = true;
@@ -3356,7 +3356,7 @@ namespace AIStudio.Wpf.DiagramDesigner
{
if (port.GetBounds().IntersectsWith(blockDesignerItemTempLink.GetBounds())) //如果两个位置相交
{
var innerport = port.GetAllContain(port.Children, false).Where(p => p.GetBounds().IntersectsWith(blockDesignerItemTempLink.GetBounds())).OrderByDescending(p => p.ContainLevel).FirstOrDefault();
var innerport = port.GetAllContain(port.Children, false).Where(p => p.GetBounds().IntersectsWith(blockDesignerItemTempLink.GetBounds())).OrderByDescending(p => p.ContainerLevel).FirstOrDefault();
if (innerport != null)
{
innerport.DataItem.ShowConnectors = true;
@@ -3446,7 +3446,7 @@ namespace AIStudio.Wpf.DiagramDesigner
var container = FindNearContainerToAttachTo(item);
if (container != null)
{
(container.DataItem as BlockDesignerItemViewModel).AddChild(item.Items.FirstOrDefault(), container);//待完善
container.DataItem.AddChild(item.Items.FirstOrDefault(), container);//待完善
container.BeAttachTo = false;
container.DisableAttachTo = false;
continue;