mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-05-01 05:33:23 +08:00
xx
This commit is contained in:
@@ -150,8 +150,8 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
double lefttop = mindNode.MiddlePosition.Y - Math.Min(mindNode.DesiredSize.Height, rights.SumOrDefault(p => p.DesiredSize.Height)) / 2;
|
||||
foreach (var child in rights)
|
||||
{
|
||||
child.Left = left + child.Spacing.Width + child.Offset.X;
|
||||
child.Top = lefttop + child.DesiredSize.Height / 2 - child.ItemHeight / 2 + child.Offset.Y;
|
||||
child.Left = left + child.Spacing.Width + child.Offset.X - child.RootNode.Offset.X;
|
||||
child.Top = lefttop + child.DesiredSize.Height / 2 - child.ItemHeight / 2 + child.Offset.Y - child.RootNode.Offset.Y;
|
||||
child.DesiredPosition = new PointBase(left + child.Spacing.Width, lefttop + child.DesiredSize.Height / 2 - child.ItemHeight / 2);
|
||||
lefttop += child.DesiredSize.Height;
|
||||
|
||||
@@ -168,8 +168,8 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
double righttop = mindNode.MiddlePosition.Y - Math.Min(mindNode.DesiredSize.Height, lefts.SumOrDefault(p => p.DesiredSize.Height)) / 2;
|
||||
foreach (var child in lefts)
|
||||
{
|
||||
child.Left = right - child.Spacing.Width - child.ItemWidth + child.Offset.X;
|
||||
child.Top = righttop + child.DesiredSize.Height / 2 - child.ItemHeight / 2 + child.Offset.Y;
|
||||
child.Left = right - child.Spacing.Width - child.ItemWidth + child.Offset.X - child.RootNode.Offset.X;
|
||||
child.Top = righttop + child.DesiredSize.Height / 2 - child.ItemHeight / 2 + child.Offset.Y - child.RootNode.Offset.Y;
|
||||
child.DesiredPosition = new PointBase(right - child.Spacing.Width - child.ItemWidth, righttop + child.DesiredSize.Height / 2 - child.ItemHeight / 2);
|
||||
righttop += child.DesiredSize.Height;
|
||||
|
||||
@@ -183,6 +183,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
}
|
||||
|
||||
mindNode.DesiredPosition = mindNode.Position;
|
||||
//mindNode.Offset = new PointBase();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -194,8 +195,8 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
foreach (var child in mindNode.Children)
|
||||
{
|
||||
child.Left = left + child.Spacing.Width + child.Offset.X;
|
||||
child.Top = top + child.DesiredSize.Height / 2 - child.ItemHeight / 2 + child.Offset.Y;
|
||||
child.Left = left + child.Spacing.Width + child.Offset.X - child.RootNode.Offset.X;
|
||||
child.Top = top + child.DesiredSize.Height / 2 - child.ItemHeight / 2 + child.Offset.Y - child.RootNode.Offset.Y;
|
||||
child.DesiredPosition = new PointBase(left + child.Spacing.Width, top + child.DesiredSize.Height / 2 - child.ItemHeight / 2);
|
||||
top += child.DesiredSize.Height;
|
||||
|
||||
@@ -216,8 +217,8 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
foreach (var child in mindNode.Children)
|
||||
{
|
||||
child.Left = right - child.Spacing.Width - child.ItemWidth + child.Offset.X;
|
||||
child.Top = top + child.DesiredSize.Height / 2 - child.ItemHeight / 2 + child.Offset.Y;
|
||||
child.Left = right - child.Spacing.Width - child.ItemWidth + child.Offset.X - child.RootNode.Offset.X;
|
||||
child.Top = top + child.DesiredSize.Height / 2 - child.ItemHeight / 2 + child.Offset.Y - child.RootNode.Offset.Y;
|
||||
child.DesiredPosition = new PointBase(right - child.Spacing.Width - child.ItemWidth, top + child.DesiredSize.Height / 2 - child.ItemHeight / 2);
|
||||
top += child.DesiredSize.Height;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user