Enhance flow arrows
This commit is contained in:
@@ -431,13 +431,13 @@ namespace PamhagenSysCtrl.Helpers {
|
||||
}
|
||||
}
|
||||
|
||||
public void ColorPipesAdjacientToPath(Path path, Brush? color1, Brush? color2) {
|
||||
public void ColorPipesAdjacientToPath(Path path, Brush? color1, bool flowArrows, Brush? color2) {
|
||||
var color = color1;
|
||||
var flowPathOffset = 0.0;
|
||||
HashSet<IEdge> visited = [];
|
||||
foreach (var (edge, node) in path.Hops) {
|
||||
edge.Highlight = color1;
|
||||
edge.Flow = color1 == PamhagenBrushes.Green ? (edge.End == node, flowPathOffset) : null;
|
||||
edge.Flow = flowArrows ? (edge.End == node, flowPathOffset) : null;
|
||||
if (edge.Flow != null) flowPathOffset += edge.FlowLength;
|
||||
visited.Add(edge);
|
||||
if (node is Pump) color = color2;
|
||||
|
||||
Reference in New Issue
Block a user