Changeset 13399
- Timestamp:
- 11/25/15 17:14:14 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphChart.cs
r13061 r13399 43 43 private Dictionary<Tuple<VisualGenealogyGraphNode, VisualGenealogyGraphNode>, VisualGenealogyGraphArc> arcMap; 44 44 45 #region chart modes45 #region chart options 46 46 public bool SimpleLineages { get; set; } 47 47 public bool LockGenealogy { get; set; } 48 48 public bool TraceFragments { get; set; } 49 #endregion 50 51 #region chart modes 52 public Dictionary<string, ChartMode> ChartMode { get; private set; } 49 53 #endregion 50 54 … … 80 84 } 81 85 82 // public bool UpdateEnabled {83 // get { return Chart.UpdateEnabled; }84 // set { Chart.UpdateEnabled = value; }85 // }86 87 // public void EnforceUpdate() {88 // Chart.EnforceUpdate();89 // }90 91 86 private Visualization.Rectangle TargetRectangle { get; set; } 92 87 protected VisualGenealogyGraphNode SelectedVisualNode { get; set; } … … 112 107 public GenealogyGraphChart() { 113 108 InitializeComponent(); 109 110 ChartMode = new Dictionary<string, ChartMode> { 111 { "Select", new SelectChartMode(this) }, 112 { "ZoomIn", new ZoomInChartMode(this) }, 113 { "ZoomOut", new ZoomOutChartMode(this) }, 114 { "Pan", new PanChartMode(this) } 115 }; 114 116 115 117 defaultBrush = new SolidBrush(Color.Transparent); … … 189 191 switch (e.Button) { 190 192 case MouseButtons.Left: 191 Mode = ChartMode .Select;193 Mode = ChartMode["Select"]; 192 194 Cursor = Cursors.Default; 193 195 break; 194 196 case MouseButtons.Middle: 195 Mode = ChartMode .Move;197 Mode = ChartMode["Pan"]; 196 198 Cursor = Cursors.Hand; 197 199 break; … … 203 205 protected override void PictureBoxOnMouseUp(object sender, MouseEventArgs e) { 204 206 Cursor = Cursors.Default; 205 if (Mode == ChartMode.Move) { 206 Mode = ChartMode.Select; 207 return; 208 } 209 if (Mode != ChartMode.Select) { 210 base.PictureBoxOnMouseUp(sender, e); 211 return; 212 } 207 213 208 var primitive = Chart.GetAllPrimitives(e.Location).FirstOrDefault(p => p is VisualGenealogyGraphNode); 214 209 if (primitive == null) {
Note: See TracChangeset
for help on using the changeset viewer.