-
Notifications
You must be signed in to change notification settings - Fork 227
/
Copy pathLinkModel.cs
28 lines (20 loc) · 1.15 KB
/
LinkModel.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using Blazor.Diagrams.Core.Anchors;
using Blazor.Diagrams.Core.Models.Base;
namespace Blazor.Diagrams.Core.Models;
public class LinkModel : BaseLinkModel
{
public LinkModel(Anchor source, Anchor target) : base(source, target) { }
public LinkModel(string id, Anchor source, Anchor target) : base(id, source, target) { }
public LinkModel(PortModel sourcePort, PortModel targetPort)
: base(new SinglePortAnchor(sourcePort), new SinglePortAnchor(targetPort)) { }
public LinkModel(NodeModel sourceNode, NodeModel targetNode)
: base(new ShapeIntersectionAnchor(sourceNode), new ShapeIntersectionAnchor(targetNode)) { }
public LinkModel(string id, PortModel sourcePort, PortModel targetPort)
: base(id, new SinglePortAnchor(sourcePort), new SinglePortAnchor(targetPort)) { }
public LinkModel(string id, NodeModel sourceNode, NodeModel targetNode)
: base(id, new ShapeIntersectionAnchor(sourceNode), new ShapeIntersectionAnchor(targetNode)) { }
public string? Color { get; set; }
public string? SelectedColor { get; set; }
public string? Classes { get; set; }
public double Width { get; set; } = 2;
}