mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-04-09 09:26:35 +08:00
重新设计了创建连线时的逻辑,能够预览连接成功后的外观样式
This commit is contained in:
@@ -98,6 +98,7 @@ public partial class NodeContainerView : UserControl
|
||||
{
|
||||
IsCanvasDragging = false;
|
||||
IsControlDragging = false;
|
||||
nodeOperationService.ConnectingData.Reset();
|
||||
}
|
||||
};
|
||||
#endregion
|
||||
@@ -190,12 +191,11 @@ public partial class NodeContainerView : UserControl
|
||||
|
||||
private void NodeContainerView_PointerMoved(object? sender, PointerEventArgs e)
|
||||
{
|
||||
|
||||
// 是否正在连接
|
||||
var myData = nodeOperationService.ConnectingData;
|
||||
if (myData.IsCreateing)
|
||||
{
|
||||
var isPass = e.JudgePointer(sender, PointerType.Mouse, p => p.IsLeftButtonPressed);
|
||||
//Debug.WriteLine("canvas ispass = " + isPass);
|
||||
if (isPass)
|
||||
{
|
||||
if (myData.Type == JunctionOfConnectionType.Invoke)
|
||||
@@ -208,7 +208,9 @@ public partial class NodeContainerView : UserControl
|
||||
_vm.IsConnectionArgSourceNode = true; // 正在连接节点的调用关系
|
||||
}
|
||||
var currentPoint = e.GetPosition(PART_NodeContainer);
|
||||
//myData.CurrentJunction?.InvalidateVisual();
|
||||
myData.UpdatePoint(new Point(currentPoint.X - 5, currentPoint.Y - 5));
|
||||
e.Handled = true;
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user