使用PointBase代替Point

This commit is contained in:
艾竹
2023-01-08 09:22:37 +08:00
parent 8fc69bc96d
commit 5d7717cc2b
65 changed files with 4317 additions and 403 deletions

View File

@@ -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; }
}
}