mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-02 15:50:51 +08:00
部分连接线拖拽完成
This commit is contained in:
@@ -37,10 +37,10 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
private static PointBase[] GetRouteWithFullConnectionLine(IDiagramViewModel _, ConnectionViewModel link, PointBase[] route)
|
||||
{
|
||||
var sourceInnerPoint = link.SourceConnectorInfo.IsInnerPoint;
|
||||
PointBase sourcePoint = link.SourceConnectorInfo.MiddlePosition;
|
||||
var sourceInnerPoint = link.SourceConnectorInfoFully.IsInnerPoint;
|
||||
PointBase sourcePoint = link.SourceConnectorInfoFully.MiddlePosition;
|
||||
PointBase sinkPoint = link.SinkConnectorInfo.MiddlePosition;
|
||||
ConnectorOrientation sourceOrientation = link.SourceConnectorInfo.Orientation;
|
||||
ConnectorOrientation sourceOrientation = link.SourceConnectorInfoFully.Orientation;
|
||||
ConnectorOrientation sinkOrientation = link.SinkConnectorInfoFully.Orientation;
|
||||
|
||||
List<PointBase> linePoints = new List<PointBase>();
|
||||
@@ -242,7 +242,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
private static PointBase[] GetRouteWithPartConnectionLine(IDiagramViewModel diagramViewModel, ConnectionViewModel link, PointBase[] route)
|
||||
{
|
||||
var sourceInnerPoint = link.SourceConnectorInfo.IsInnerPoint;
|
||||
var sourceInnerPoint = link.SourceConnectorInfoFully?.IsInnerPoint ?? false;
|
||||
PointBase sourcePoint = link.SourceConnectorInfo.MiddlePosition;
|
||||
PointBase sinkPoint = link.SinkConnectorInfo.MiddlePosition;
|
||||
ConnectorOrientation sourceOrientation = link.SourceConnectorInfo.Orientation;
|
||||
@@ -301,8 +301,8 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
linePoints = OptimizeLinePoints(linePoints, new RectangleBase[] { rectSource }, sourceOrientation, preferredOrientation);
|
||||
else
|
||||
linePoints = OptimizeLinePoints(linePoints, new RectangleBase[] { rectSource }, sourceOrientation, GetOpositeOrientation(sourceOrientation));
|
||||
|
||||
linePoints.Insert(0, sourcePoint);
|
||||
|
||||
linePoints.Insert(0, sourcePoint);
|
||||
|
||||
return linePoints.ToArray();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user