Changeset 10730 for branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphChart.cs
- Timestamp:
- 04/08/14 17:23:51 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphChart.cs
r10650 r10730 196 196 // new node has been selected, clean up 197 197 Chart.UpdateEnabled = false; 198 if (ModifierKeys != Keys.Shift) 198 if (ModifierKeys != Keys.Shift) { 199 199 // clear colors 200 200 ClearPrimitives(); 201 } 201 202 // use a rectangle to highlight the currently selected genealogy graph node 202 203 var gNode = SelectedVisualNode.Data; … … 222 223 #endregion 223 224 224 private void DrawLineage(VisualGenealogyGraphNode node, Func<VisualGenealogyGraphNode, IEnumerable<VisualGenealogyGraphArc>> arcSelector, Func<VisualGenealogyGraphArc, VisualGenealogyGraphNode> nodeSelector) {225 private static void DrawLineage(VisualGenealogyGraphNode node, Func<VisualGenealogyGraphNode, IEnumerable<VisualGenealogyGraphArc>> arcSelector, Func<VisualGenealogyGraphArc, VisualGenealogyGraphNode> nodeSelector) { 225 226 if (node.Brush != null) return; 226 227 node.Brush = new SolidBrush(node.Data.GetColor()); 227 var arcs = arcSelector(node); 228 if (arcs == null) return; 229 228 var arcs = arcSelector(node).ToList(); 230 229 foreach (var arc in arcs) { 231 230 var source = arc.Source.Data; … … 235 234 arc.Pen.Brush = new LinearGradientBrush(start, end, source.GetColor(), target.GetColor()); 236 235 arc.Pen.Color = Color.Transparent; 237 // arc.Pen.FontBrush = new SolidBrush(Color.DarkGray);236 // if (arc == arcs[0]) { arc.Pen.Width = 2; } // mark connection to the root parent 238 237 DrawLineage(nodeSelector(arc), arcSelector, nodeSelector); 239 238 }
Note: See TracChangeset
for help on using the changeset viewer.