Skip to content

Commit

Permalink
Address review suggestion by @koschke
Browse files Browse the repository at this point in the history
  • Loading branch information
falko17 committed Sep 16, 2024
1 parent 2160d78 commit e53bde9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Assets/SEE/Controls/Actions/ShowEdges.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class ShowEdges : InteractableObjectAction
/// <summary>
/// The toggle that is used to determine whether an edge is currently selected.
/// </summary>
private const string EdgeIsSelectedToggle = "IsSelected";
private const string edgeIsSelectedToggle = "IsSelected";

/// <summary>
/// The delay between each depth level when showing/hiding the transitive closure of edges.
Expand Down Expand Up @@ -107,7 +107,7 @@ private void SelectionOn(InteractableObject interactableObject, bool isInitiator
if (gameObject.TryGetNode(out Node node))
{
RelevantEdges(node, followSource: false, followTarget: true, true)
.SelectMany(x => x).ForEach(x => x.SetToggle(EdgeIsSelectedToggle, true));
.SelectMany(x => x).ForEach(x => x.SetToggle(edgeIsSelectedToggle, true));
}
}
}
Expand All @@ -132,7 +132,7 @@ private void SelectionOff(InteractableObject interactableObject, bool isInitiato
if (gameObject.TryGetNode(out Node node))
{
RelevantEdges(node, followSource: false, followTarget: true, true)
.SelectMany(x => x).ForEach(x => x.SetToggle(EdgeIsSelectedToggle, false));
.SelectMany(x => x).ForEach(x => x.SetToggle(edgeIsSelectedToggle, false));
}
}
}
Expand Down Expand Up @@ -251,7 +251,7 @@ IEnumerable<IEnumerable<Edge>> IteratedConnectedEdges(Func<Edge, Node> getSucces
List<Edge> connected = DirectlyConnectedEdges(currentNode).ToList();
results[distance].AddRange(connected.Where(x => x.HasToggle(Edge.IsHiddenToggle)
// Hover should not override edges shown by selection.
&& (fromSelection || !x.HasToggle(EdgeIsSelectedToggle))));
&& (fromSelection || !x.HasToggle(edgeIsSelectedToggle))));
// Queue successors, if there are any.
connected.Select(getSuccessorNode)
.Where(x => x != null)
Expand Down

0 comments on commit e53bde9

Please sign in to comment.