Display flow arrows when selecting a path

This commit is contained in:
2026-07-31 14:22:00 +02:00
parent 79e8640ac0
commit 19deed4fd7
7 changed files with 178 additions and 1 deletions
+5
View File
@@ -10,9 +10,12 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
public bool IsTwoWay { get; set; }
public bool Orientation { get; set; }
public Brush? Highlight { get; set; }
public (bool TowardEnd, double PathOffset)? Flow { get; set; }
public double FlowLength => _flowArrow?.Length ?? 0;
private Polyline? _outer;
private Polyline? _inner;
private FlowArrow? _flowArrow;
public Pipe(INode start, INode end, bool orientation = false, bool twoWay = false) {
Start = start;
@@ -46,10 +49,12 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
};
canvas.Children.Add(_outer);
canvas.Children.Add(_inner);
_flowArrow = FlowArrow.Create(canvas, _inner);
}
public void Update() {
_inner?.Stroke = Highlight ?? Brushes.DarkGray;
_flowArrow?.Update(Highlight == PamhagenBrushes.Green ? Flow : null);
}
}
}