From 6de36f2473e1a758287b45f53701916e43020b65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=89=BE=E7=AB=B9?= Date: Tue, 2 May 2023 17:28:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9E=E7=BA=BF=E4=BC=98=E5=8C=961=EF=BC=9A?= =?UTF-8?q?=E5=BC=80=E5=A7=8B=E5=92=8C=E7=BB=93=E6=9D=9F=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controls/DesignerCanvas.cs | 1 + .../Routers/Routers.Normal.cs | 2 +- .../UserControls/DiagramControl.xaml | 46 ++++++++++++++++++- .../UserControls/LineControl.xaml | 4 +- .../BaseViewModel/ConnectionViewModel.cs | 35 +++++++++++++- .../Connector/ConnectorPointModel.cs | 2 +- .../Connector/ConnectorVertexModel.cs | 18 ++++++++ 7 files changed, 100 insertions(+), 8 deletions(-) diff --git a/AIStudio.Wpf.DiagramDesigner/Controls/DesignerCanvas.cs b/AIStudio.Wpf.DiagramDesigner/Controls/DesignerCanvas.cs index 2273d7e..e2f2fd4 100644 --- a/AIStudio.Wpf.DiagramDesigner/Controls/DesignerCanvas.cs +++ b/AIStudio.Wpf.DiagramDesigner/Controls/DesignerCanvas.cs @@ -62,6 +62,7 @@ namespace AIStudio.Wpf.DiagramDesigner partialConnection = new ConnectionViewModel(_viewModel, sourceDataItem, new PartCreatedConnectorInfo(point.X, point.Y), DrawMode, RouterMode); _viewModel.Add(partialConnection); + partialConnection.ZIndex = -1; } } } diff --git a/AIStudio.Wpf.DiagramDesigner/Routers/Routers.Normal.cs b/AIStudio.Wpf.DiagramDesigner/Routers/Routers.Normal.cs index 70b6291..1178974 100644 --- a/AIStudio.Wpf.DiagramDesigner/Routers/Routers.Normal.cs +++ b/AIStudio.Wpf.DiagramDesigner/Routers/Routers.Normal.cs @@ -7,7 +7,7 @@ namespace AIStudio.Wpf.DiagramDesigner { public static PointBase[] Normal(IDiagramViewModel _, ConnectionViewModel link) { - return link.Vertices.Select(v => v.MiddlePosition).ToArray(); + return link.Vertices.Where(p => p.ConnectorVertexType == ConnectorVertexType.None).Select(v => v.MiddlePosition).ToArray(); } } } diff --git a/AIStudio.Wpf.DiagramDesigner/UserControls/DiagramControl.xaml b/AIStudio.Wpf.DiagramDesigner/UserControls/DiagramControl.xaml index 37201b4..1e4eff3 100644 --- a/AIStudio.Wpf.DiagramDesigner/UserControls/DiagramControl.xaml +++ b/AIStudio.Wpf.DiagramDesigner/UserControls/DiagramControl.xaml @@ -157,12 +157,54 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + +