mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-04 08:06:36 +08:00
Mind
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user