mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 00:00:57 +08:00
33 lines
1.2 KiB
C#
33 lines
1.2 KiB
C#
|
|
namespace AIStudio.Wpf.DiagramDesigner
|
|||
|
|
{
|
|||
|
|
public class LinkLabelModel : ConnectorPoint
|
|||
|
|
{
|
|||
|
|
public LinkLabelModel(ConnectorViewModel parent, string id, string content, double? distance = null, ConnectorPoint offset = null)
|
|||
|
|
{
|
|||
|
|
Parent = parent;
|
|||
|
|
Content = content;
|
|||
|
|
Distance = distance;
|
|||
|
|
Offset = offset;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public LinkLabelModel(ConnectorViewModel parent, string content, double? distance = null, ConnectorPoint offset = null)
|
|||
|
|
{
|
|||
|
|
Parent = parent;
|
|||
|
|
Content = content;
|
|||
|
|
Distance = distance;
|
|||
|
|
Offset = offset;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public ConnectorViewModel Parent { get; }
|
|||
|
|
public string Content { get; set; }
|
|||
|
|
/// <summary>
|
|||
|
|
/// 3 types of values are possible:
|
|||
|
|
/// <para>- A number between 0 and 1: Position relative to the link's length</para>
|
|||
|
|
/// <para>- A positive number, greater than 1: Position away from the start</para>
|
|||
|
|
/// <para>- A negative number, less than 0: Position away from the end</para>
|
|||
|
|
/// </summary>
|
|||
|
|
public double? Distance { get; set; }
|
|||
|
|
public ConnectorPoint Offset { get; set; }
|
|||
|
|
}
|
|||
|
|
}
|