mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 00:00:57 +08:00
修复旋转放大后 画线的问题
This commit is contained in:
@@ -548,15 +548,15 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
var startMiddle = new RectangleBase
|
||||
(
|
||||
Math.Abs((PathGeneratorResult.SourceMarkerPosition.X + (source.Value.X - Area.Left)) / 2),
|
||||
Math.Abs((PathGeneratorResult.SourceMarkerPosition.Y + (source.Value.Y - Area.Top)) / 2),
|
||||
(PathGeneratorResult.SourceMarkerPosition.X + (source.Value.X - Area.Left)) / 2,
|
||||
(PathGeneratorResult.SourceMarkerPosition.Y + (source.Value.Y - Area.Top)) / 2,
|
||||
0,
|
||||
0
|
||||
);
|
||||
var endMiddle = new RectangleBase
|
||||
(
|
||||
Math.Abs((PathGeneratorResult.TargetMarkerPosition.X + (target.Value.X - Area.Left)) / 2),
|
||||
Math.Abs((PathGeneratorResult.TargetMarkerPosition.Y + (target.Value.Y - Area.Top)) / 2),
|
||||
(PathGeneratorResult.TargetMarkerPosition.X + (target.Value.X - Area.Left)) / 2,
|
||||
(PathGeneratorResult.TargetMarkerPosition.Y + (target.Value.Y - Area.Top)) / 2,
|
||||
0,
|
||||
0
|
||||
);
|
||||
@@ -589,8 +589,8 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
if (SourceConnectorInfo.DataItem == null || (IsFullConnection && SinkConnectorInfoFully.DataItem == null))
|
||||
return (null, null);
|
||||
|
||||
var sourceCenter = SourceConnectorInfo.IsPortless ? SourceConnectorInfo.DataItem.GetBounds().Center : SourceConnectorInfo.MiddlePosition;
|
||||
var targetCenter = SinkConnectorInfoFully?.IsPortless == true ? SinkConnectorInfoFully?.DataItem?.GetBounds().Center ?? OnGoingPosition : SinkConnectorInfoFully?.MiddlePosition ?? OnGoingPosition;
|
||||
var sourceCenter = SourceConnectorInfo.IsPortless ? SourceConnectorInfo.DataItem.MiddlePosition : SourceConnectorInfo.MiddlePosition;
|
||||
var targetCenter = SinkConnectorInfoFully?.IsPortless == true ? SinkConnectorInfoFully?.DataItem?.MiddlePosition ?? OnGoingPosition : SinkConnectorInfoFully?.MiddlePosition ?? OnGoingPosition;
|
||||
var firstPt = route.Length > 0 ? route[0] : targetCenter;
|
||||
var secondPt = route.Length > 0 ? route[0] : sourceCenter;
|
||||
var sourceLine = new LineBase(firstPt, sourceCenter);
|
||||
|
||||
Reference in New Issue
Block a user