This commit is contained in:
艾竹
2023-03-29 22:55:12 +08:00
parent f80a67ff10
commit 02ebd056b3
8 changed files with 37 additions and 34 deletions

View File

@@ -133,8 +133,8 @@ namespace AIStudio.Wpf.Mind.Helpers
mindNode.DesiredPosition = mindNode.Position;
}
double left = mindNode.DesiredMiddlePosition.X - Math.Max(mindNode.DesiredSize.Width, mindNode.Children.SumOrDefault(p => p.DesiredSize.Width)) / 2;
double top = mindNode.DesiredMiddlePosition.Y + mindNode.ItemHeight / 2 + mindNode.Spacing.Height;
double left = mindNode.DesiredPosition.X + mindNode.ItemWidth / 2 - Math.Max(mindNode.DesiredSize.Width, mindNode.Children.SumOrDefault(p => p.DesiredSize.Width)) / 2;
double top = mindNode.DesiredPosition.Y + mindNode.ItemHeight + mindNode.Spacing.Height;
if (mindNode.Children?.Count > 0)
{
foreach (var child in mindNode.Children)