mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-09 02:36:35 +08:00
mind的拷贝完成
This commit is contained in:
@@ -115,12 +115,9 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
connector?.UpdateConnectionMode(source.FirstConnector, sink.FirstConnector, drawMode.ToString(), routerMode.ToString());
|
||||
}
|
||||
connector.ColorViewModel.LineColor = source.ColorViewModel.LineColor;
|
||||
connector.SmoothMargin = 20;
|
||||
connector.SmoothAutoSlope = 0.2;
|
||||
connector.OrthogonalShapeMargin = 2;
|
||||
connector.OrthogonalGlobalBoundsMargin = 5;
|
||||
connector.ShapeViewModel.SinkMarker.PathStyle = source.ShapeViewModel.SinkMarker.PathStyle;
|
||||
connector.ShapeViewModel.SinkMarker.SizeStyle = source.ShapeViewModel.SinkMarker.SizeStyle;
|
||||
connector.SetPathGeneratorParameter(smoothMargin: 20, smoothAutoSlope: 0.2, orthogonalShapeMargin: 2, orthogonalGlobalBoundsMargin: 5);
|
||||
|
||||
return connector;
|
||||
}
|
||||
@@ -186,7 +183,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
child.Left = topleft + child.Spacing.Width + child.Offset.X;
|
||||
child.Top = toptop - child.ItemHeight - child.Spacing.Height + child.Offset.Y;
|
||||
child.DesiredPosition = child.Position;
|
||||
child.DesiredPosition = new PointBase(topleft + child.Spacing.Width, toptop - child.ItemHeight - child.Spacing.Height);
|
||||
topleft += child.DesiredSize.Width;
|
||||
|
||||
ArrangeOverride(child);
|
||||
@@ -209,7 +206,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
child.Left = bottomleft + child.Spacing.Width + child.Offset.X;
|
||||
child.Top = bottomtop + child.Spacing.Height + child.Offset.Y;
|
||||
child.DesiredPosition = child.Position;
|
||||
child.DesiredPosition = new PointBase(bottomleft + child.Spacing.Width, bottomtop + child.Spacing.Height);
|
||||
bottomleft += child.DesiredSize.Width;
|
||||
|
||||
ArrangeOverride(child);
|
||||
@@ -220,6 +217,8 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
connector?.SetVisible(child.Visible);
|
||||
}
|
||||
}
|
||||
|
||||
mindNode.DesiredPosition = mindNode.Position;
|
||||
}
|
||||
else if (mindNode.NodeLevel == 1)
|
||||
{
|
||||
@@ -234,7 +233,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
child.Left = x0 + (h + child.DesiredSize.Height - child.ItemHeight / 2 - child.Spacing.Height) + child.Offset.X;
|
||||
child.Top = y0 - (h + child.DesiredSize.Height - child.Spacing.Height) + child.Offset.Y;
|
||||
child.DesiredPosition = child.Position;
|
||||
child.DesiredPosition = new PointBase(x0 + (h + child.DesiredSize.Height - child.ItemHeight / 2 - child.Spacing.Height), y0 - (h + child.DesiredSize.Height - child.Spacing.Height));
|
||||
h += child.DesiredSize.Height;
|
||||
|
||||
ArrangeOverride(child);
|
||||
@@ -257,7 +256,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
child.Left = x0 + (h + child.DesiredSize.Height - child.ItemHeight / 2 - child.Spacing.Height) + child.Offset.X;
|
||||
child.Top = y0 + (h + child.DesiredSize.Height - child.ItemHeight - child.Spacing.Height) + child.Offset.Y;
|
||||
child.DesiredPosition = child.Position;
|
||||
child.DesiredPosition = new PointBase(x0 + (h + child.DesiredSize.Height - child.ItemHeight / 2 - child.Spacing.Height), y0 + (h + child.DesiredSize.Height - child.ItemHeight - child.Spacing.Height));
|
||||
h += child.DesiredSize.Height;
|
||||
|
||||
ArrangeOverride(child);
|
||||
@@ -282,7 +281,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
child.Left = left + child.Offset.X;
|
||||
child.Top = top + child.Spacing.Height + child.Offset.Y;
|
||||
child.DesiredPosition = child.Position;
|
||||
child.DesiredPosition = new PointBase(left, top + child.Spacing.Height);
|
||||
top += child.DesiredSize.Height;
|
||||
|
||||
ArrangeOverride(child);
|
||||
@@ -304,7 +303,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
child.Left = left + child.Offset.X;
|
||||
child.Top = bottom - child.Spacing.Height - child.ItemHeight + child.Offset.Y;
|
||||
child.DesiredPosition = child.Position;
|
||||
child.DesiredPosition = new PointBase(left, bottom - child.Spacing.Height - child.ItemHeight);
|
||||
bottom -= child.DesiredSize.Height;
|
||||
|
||||
ArrangeOverride(child);
|
||||
|
||||
Reference in New Issue
Block a user