This commit is contained in:
艾竹
2023-03-07 22:59:27 +08:00
parent f042f95ee0
commit f48838f54a
7 changed files with 66 additions and 35 deletions

View File

@@ -315,6 +315,24 @@ namespace AIStudio.Wpf.DiagramDesigner
public bool ShowArrow { get; set; } = true;
public bool ShowResized
{
get; set;
}
private bool alwayForResized;
public bool AlwayForResized
{
get
{
return alwayForResized;
}
set
{
SetProperty(ref alwayForResized, value);
}
}
private bool enabledForConnection = true;
public bool EnabledForConnection
{

View File

@@ -48,7 +48,7 @@ namespace AIStudio.Wpf.DiagramDesigner
}
}
internal List<IGroupable> GetGroupMembers(IGroupable item)
internal List<IGroupable> GetGroupMembers(IGroupable item, bool withchildren=true)
{
IEnumerable<IGroupable> list = DiagramViewModel.Items.OfType<IGroupable>();
IGroupable rootItem = GetRoot(list, item);
@@ -56,7 +56,18 @@ namespace AIStudio.Wpf.DiagramDesigner
{
return new List<IGroupable>();
}
return GetGroupMembers(list, rootItem);
if (rootItem.IsGroup)//分组状态下,获取全部成员
{
return GetGroupMembers(list, rootItem);
}
else
{
if (withchildren)
return GetGroupMembers(list, item);//普通的Parent关系获取其Children
else
return new List<IGroupable>() { item };
}
}
internal IGroupable GetGroupRoot(IGroupable item)
@@ -98,5 +109,7 @@ namespace AIStudio.Wpf.DiagramDesigner
return groupMembers;
}
}
}