@@ -512,6 +512,7 @@ namespace PamhagenSysCtrl.Helpers {
|
||||
HashSet<IEdge> visited = [];
|
||||
foreach (var (edge, node) in path.Hops) {
|
||||
edge.Highlight = color1;
|
||||
(edge.Start as PipeJoin)?.Highlight = color1;
|
||||
if (flowArrows > MotorState.Halt) {
|
||||
var dir = edge.End == node;
|
||||
if (flowArrows == MotorState.Backward) dir = !dir;
|
||||
@@ -520,7 +521,10 @@ namespace PamhagenSysCtrl.Helpers {
|
||||
}
|
||||
visited.Add(edge);
|
||||
if (node is Pump) color = color2;
|
||||
TraverseSubgraph(node, (n) => n is Valve || n is ISink || n is Pump, visited, edgeAction: (s, r, e) => e.Highlight = color);
|
||||
TraverseSubgraph(node, (n) => n is Valve || n is ISink || n is Pump, visited, edgeAction: (s, r, e) => {
|
||||
(s as PipeJoin)?.Highlight = color;
|
||||
e.Highlight = color;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -530,6 +534,8 @@ namespace PamhagenSysCtrl.Helpers {
|
||||
edgeAction: (s, r, e) => {
|
||||
if (((e.Start as Valve)?.IsOpen ?? true) && ((e.End as Valve)?.IsOpen ?? true)) {
|
||||
e.Highlight = color1;
|
||||
(e.Start as PipeJoin)?.Highlight = color1;
|
||||
(e.End as PipeJoin)?.Highlight = color1;
|
||||
if (flowArrows == MotorState.Forward || flowArrows == MotorState.Backward) {
|
||||
var dir = e.Start == s;
|
||||
if (r) dir = !dir;
|
||||
|
||||
Reference in New Issue
Block a user