Display flow arrows when selecting a path
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user