2023-01-12 23:02:53 +08:00
|
|
|
|
using AIStudio.Wpf.DiagramDesigner.Geometrys;
|
2023-01-08 09:22:37 +08:00
|
|
|
|
|
|
|
|
|
|
namespace AIStudio.Wpf.DiagramDesigner
|
|
|
|
|
|
{
|
|
|
|
|
|
public class LinkVertexModel : ConnectorPoint
|
|
|
|
|
|
{
|
|
|
|
|
|
public LinkVertexModel(ConnectorViewModel parent, PointBase? position = null)
|
|
|
|
|
|
{
|
|
|
|
|
|
Parent = parent;
|
|
|
|
|
|
X = position?.X ?? 0;
|
|
|
|
|
|
Y = position?.Y ?? 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public ConnectorViewModel Parent
|
|
|
|
|
|
{
|
|
|
|
|
|
get;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-01-21 22:01:10 +08:00
|
|
|
|
public override PointBase Position
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return new PointBase(Parent.Area.Left + Left, Parent.Area.Top + Top);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override PointBase MiddlePosition => new PointBase(Parent.Area.Left + Left + ConnectorWidth / 2, Parent.Area.Top + Top + ConnectorHeight / 2);
|
|
|
|
|
|
|
2023-01-08 09:22:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|