整理了下代码,摸一摸bug

This commit is contained in:
艾竹
2023-05-21 23:03:28 +08:00
parent fde899cfa9
commit b11d39024a
13 changed files with 51 additions and 20 deletions

View File

@@ -43,5 +43,18 @@ namespace AIStudio.Wpf.DiagramDesigner
ColorViewModel.LineColor.Color = Colors.Transparent;
ColorViewModel.FillColor.Color = Colors.Transparent;
}
public override bool CanAttachTo(ConnectorInfoBase port)
{
if (port is BlockConnectorInfo blockConnectorInfo)
{
return port != this && !port.IsReadOnly && DataItem != blockConnectorInfo.DataItem;
}
else
{
return false;
}
}
}
}