private void ReloadSelectedNodeConnections(Node centerNode) { currentVisibleIndex = 0; graph.ConnectionObjectMap.Keys.ToList().ForEach(ConnectionLoadManager.UnloadConnection); SeriesScrolls = 0; ResetTimer(); if (centerNode == null) { return; } selectedNodeDistribution = new ConnectionDistributionService(centerNode, this); UpdateVisibleConnections(scrollDirection, true); SwitchConnectionTypes(); }
private void OnHighlightedNodeChanged(Node oldNode, Node newNode) { if (NodeController.SelectedNode != null && (NodeController.SelectedNode == oldNode || NodeController.SelectedNode == newNode)) { return; } if (oldNode != null) { GetConnectionsAround(oldNode).Where(connection => !connection.Ends.Contains(NodeController.SelectedNode)).ToList().ForEach(ConnectionLoadManager.UnloadConnection); } if (newNode != null) { highlightedNodeDistribution = new ConnectionDistributionService(newNode, this); CreateConnectionsAround(newNode, ConnectionDistribution.MaxVisibleNumber).ToList().ForEach(con => ConnectionLoadManager.LoadConnection(con, highlightedNodeDistribution)); } }