mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-15 05:36:35 +08:00
xx
This commit is contained in:
@@ -176,9 +176,11 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
if (mindNode.NodeLevel == 0)
|
||||
{
|
||||
mindNode.DesiredPosition = mindNode.Position;
|
||||
|
||||
var tops = mindNode.Children.Where(p => p.ConnectorOrientation == ConnectorOrientation.BottomLeft).ToList();
|
||||
double topleft = mindNode.MiddlePosition.X + mindNode.ItemWidth / 2 + mindNode.Spacing.Width;
|
||||
double toptop = mindNode.MiddlePosition.Y - mindNode.ItemHeight / 2 - mindNode.Spacing.Height;
|
||||
double topleft = mindNode.DesiredPosition.X + mindNode.ItemWidth + mindNode.Spacing.Width;
|
||||
double toptop = mindNode.DesiredPosition.Y - mindNode.Spacing.Height;
|
||||
|
||||
if (mindNode.Children?.Count > 0)
|
||||
{
|
||||
@@ -201,8 +203,8 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
|
||||
var bottomoffset = mindNode.Spacing.Width / 2;
|
||||
var bottoms = mindNode.Children.Where(p => p.ConnectorOrientation == ConnectorOrientation.TopLeft).ToList();
|
||||
double bottomleft = mindNode.MiddlePosition.X + mindNode.ItemWidth / 2 + mindNode.Spacing.Width + bottomoffset;
|
||||
double bottomtop = mindNode.MiddlePosition.Y + mindNode.ItemHeight / 2 + mindNode.Spacing.Height;
|
||||
double bottomleft = mindNode.DesiredPosition.X + mindNode.ItemWidth + mindNode.Spacing.Width + bottomoffset;
|
||||
double bottomtop = mindNode.DesiredPosition.Y + mindNode.ItemHeight + mindNode.Spacing.Height;
|
||||
|
||||
if (mindNode.Children?.Count > 0)
|
||||
{
|
||||
@@ -222,8 +224,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
connector?.SetVisible(child.Visible);
|
||||
}
|
||||
}
|
||||
|
||||
mindNode.DesiredPosition = mindNode.Position;
|
||||
|
||||
mindNode.Offset = new PointBase();//修正后归0
|
||||
}
|
||||
else if (mindNode.NodeLevel == 1)
|
||||
@@ -281,8 +282,8 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
if (mindNode.GetLevel1Node().ConnectorOrientation == ConnectorOrientation.BottomLeft)
|
||||
{
|
||||
double left = mindNode.DesiredMiddlePosition.X;
|
||||
double top = mindNode.DesiredMiddlePosition.Y + mindNode.ItemHeight / 2 + mindNode.Spacing.Height;
|
||||
double left = mindNode.DesiredPosition.X + mindNode.ItemWidth / 2;
|
||||
double top = mindNode.DesiredPosition.Y + mindNode.ItemHeight + mindNode.Spacing.Height;
|
||||
if (mindNode.Children?.Count > 0)
|
||||
{
|
||||
foreach (var child in mindNode.Children)
|
||||
@@ -304,8 +305,8 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
}
|
||||
else
|
||||
{
|
||||
double left = mindNode.DesiredMiddlePosition.X;
|
||||
double bottom = mindNode.DesiredMiddlePosition.Y - mindNode.ItemHeight / 2 - mindNode.Spacing.Height;
|
||||
double left = mindNode.DesiredPosition.X + mindNode.ItemWidth / 2;
|
||||
double bottom = mindNode.DesiredPosition.Y - mindNode.Spacing.Height;
|
||||
if (mindNode.Children?.Count > 0)
|
||||
{
|
||||
foreach (var child in mindNode.Children)
|
||||
|
||||
Reference in New Issue
Block a user