mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-22 01:16:35 +08:00
修改暂存一下
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using AIStudio.Wpf.DiagramDesigner.Geometry;
|
||||
using System.Linq;
|
||||
using AIStudio.Wpf.DiagramDesigner.Geometrys;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
@@ -28,8 +29,20 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
var result = new PointBase[route.Length + 2];
|
||||
result[0] = source;
|
||||
route.CopyTo(result, 1);
|
||||
result[route.Length - 1] = target;
|
||||
result[result.Length - 1] = target;
|
||||
return result;
|
||||
}
|
||||
|
||||
private static void DoShift(PointBase[] points, ConnectorViewModel link)
|
||||
{
|
||||
double left = link.Area.Left;
|
||||
double top = link.Area.Top;
|
||||
|
||||
for (int i = 0; i < points.Length; i++)
|
||||
{
|
||||
points[i].X = points[i].X - left;
|
||||
points[i].Y = points[i].Y - top;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user