mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-10 19:50:52 +08:00
使用PointBase代替Point
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user