mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 08:10:50 +08:00
31 lines
801 B
C#
31 lines
801 B
C#
using AIStudio.Wpf.DiagramDesigner.Geometrys;
|
|
|
|
namespace AIStudio.Wpf.DiagramDesigner
|
|
{
|
|
public class ConnectorVertexModel : ConnectorPoint
|
|
{
|
|
public ConnectorVertexModel(ConnectorViewModel parent, PointBase? position = null)
|
|
{
|
|
Parent = parent;
|
|
X = position?.X ?? 0;
|
|
Y = position?.Y ?? 0;
|
|
}
|
|
|
|
public ConnectorViewModel Parent
|
|
{
|
|
get;
|
|
}
|
|
|
|
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);
|
|
|
|
}
|
|
}
|