可以把连线从节点上拖下来,并且依附上去。

This commit is contained in:
艾竹
2023-05-03 13:28:16 +08:00
parent 1536e5018d
commit ed22b9daa3
13 changed files with 352 additions and 79 deletions

View File

@@ -144,29 +144,48 @@ namespace AIStudio.Wpf.DiagramDesigner
}
public virtual PointBase MiddlePosition => new PointBase(X, Y);
private double connectorWidth = 8;
private double _connectorWidth = 8;
public double ConnectorWidth
{
get
{
return connectorWidth;
return _connectorWidth;
}
set
{
connectorWidth = value;
_connectorWidth = value;
}
}
private double connectorHeight = 8;
private double _connectorHeight = 8;
public double ConnectorHeight
{
get
{
return connectorHeight;
return _connectorHeight;
}
set
{
connectorHeight = value;
_connectorHeight = value;
}
}
public void SetPosition(PointBase position)
{
X = position.X;
Y = position.Y;
}
private bool _dragStart;
public bool DragStart
{
get
{
return _dragStart;
}
set
{
SetProperty(ref _dragStart, value);
}
}