mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-03 00:00:49 +08:00
重新设计了@get 表达式,修改了 Workbench后台长时间运行时,重新切换到前台会产生参数连接线错误显示的问题
This commit is contained in:
@@ -113,6 +113,11 @@ namespace Serein.Workbench.Node.View
|
||||
/// </summary>
|
||||
public ConnectionInvokeType InvokeType { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 目标节点控制点
|
||||
/// </summary>
|
||||
private INodeJunction EndNode;
|
||||
|
||||
/// <summary>
|
||||
/// 获取参数类型,第几个参数
|
||||
/// </summary>
|
||||
@@ -138,6 +143,8 @@ namespace Serein.Workbench.Node.View
|
||||
/// </summary>
|
||||
private ConnectionLineShape BezierLine;
|
||||
|
||||
|
||||
|
||||
private LineType LineType;
|
||||
|
||||
/// <summary>
|
||||
@@ -168,7 +175,8 @@ namespace Serein.Workbench.Node.View
|
||||
int argIndex,
|
||||
ConnectionArgSourceType argSourceType,
|
||||
JunctionControlBase Start,
|
||||
JunctionControlBase End)
|
||||
JunctionControlBase End,
|
||||
INodeJunction nodeJunction)
|
||||
{
|
||||
this.LineType = LineType;
|
||||
this.Canvas = Canvas;
|
||||
@@ -176,6 +184,7 @@ namespace Serein.Workbench.Node.View
|
||||
this.ArgSourceType = argSourceType;
|
||||
this.Start = Start;
|
||||
this.End = End;
|
||||
this.EndNode = nodeJunction;
|
||||
InitElementPoint();
|
||||
}
|
||||
|
||||
@@ -242,6 +251,10 @@ namespace Serein.Workbench.Node.View
|
||||
/// </summary>
|
||||
public void RefreshLine()
|
||||
{
|
||||
if(ArgIndex > -1)
|
||||
{
|
||||
End = EndNode.GetJunctionOfArgData(ArgIndex);
|
||||
}
|
||||
(Point startPoint, Point endPoint) = RefreshPoint(Canvas, Start, End);
|
||||
BezierLine.UpdatePoints(startPoint, endPoint);
|
||||
}
|
||||
@@ -255,7 +268,6 @@ namespace Serein.Workbench.Node.View
|
||||
|
||||
private (Point startPoint, Point endPoint) RefreshPoint(Canvas canvas, FrameworkElement startElement, FrameworkElement endElement)
|
||||
{
|
||||
|
||||
var startPoint = startElement.TranslatePoint(rightCenterOfStartLocation, canvas); // 获取起始节点的中心位置
|
||||
var endPoint = endElement.TranslatePoint(leftCenterOfEndLocation, canvas); // 计算终点位置
|
||||
return (startPoint, endPoint);
|
||||
|
||||
Reference in New Issue
Block a user