mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-04 08:06:36 +08:00
mind的拷贝完成
This commit is contained in:
@@ -88,14 +88,10 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
connector?.UpdateConnectionMode(source.FirstConnector, sink.FirstConnector, DrawMode.ConnectingLineStraight.ToString(), RouterMode.RouterOrthogonal.ToString());
|
||||
}
|
||||
connector.ColorViewModel.LineColor = source.ColorViewModel.LineColor;
|
||||
connector.SmoothMargin = 20;
|
||||
connector.SmoothAutoSlope = 0.2;
|
||||
connector.OrthogonalShapeMargin = 2;
|
||||
connector.OrthogonalGlobalBoundsMargin = 5;
|
||||
connector.ColorViewModel.LineColor = source.ColorViewModel.LineColor;
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -147,7 +143,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
child.Left = left + child.DesiredSize.Width / 2 - child.ItemWidth / 2 + child.Offset.X;
|
||||
child.Top = top + child.Spacing.Height + child.Offset.Y;
|
||||
child.DesiredPosition = child.Position;
|
||||
child.DesiredPosition = new PointBase(left + child.DesiredSize.Width / 2 - child.ItemWidth / 2, top + child.Spacing.Height);
|
||||
left += child.DesiredSize.Width;
|
||||
|
||||
ArrangeOverride(child);
|
||||
@@ -158,6 +154,8 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
connector?.SetVisible(child.Visible);
|
||||
}
|
||||
}
|
||||
|
||||
mindNode.DesiredPosition = mindNode.Position;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -169,7 +167,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);
|
||||
|
||||
Reference in New Issue
Block a user