Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/07/14 17:05:31 (10 years ago)
Author:
bburlacu
Message:

#1772: Improved aspect of visual components of the FragmentGraphView.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeTile.cs

    r10685 r10728  
    3535  /// </summary>
    3636  public class SymbolicExpressionTreeTile : Group {
    37     public double PreferredNodeWidth { get; set; }
    38     public double PreferredNodeHeight { get; set; }
     37    public int PreferredNodeWidth { get; set; }
     38    public int PreferredNodeHeight { get; set; }
    3939
    4040    public Size Size {
     
    119119      var actualRoot = Root;
    120120      if (Root.Symbol is ProgramRootSymbol && Root.SubtreeCount == 1) { actualRoot = Root.GetSubtree(0); }
     121
     122      LayoutEngine.NodeWidth = PreferredNodeWidth;
     123      LayoutEngine.NodeHeight = PreferredNodeHeight;
     124
    121125      var visualNodes = LayoutEngine.CalculateLayout(actualRoot);
    122126
     
    139143        this.Add(rectangularPrimitive);
    140144
    141         //        int x = Position.X, y = Position.Y;
    142         //        if (x > rectangularPrimitive.LowerLeft.X) {
    143         //          x = (int)Math.Floor(rectangularPrimitive.LowerLeft.X);
    144         //        }
    145         //        if (y > rectangularPrimitive.LowerLeft.Y) {
    146         //          y = (int)Math.Floor(rectangularPrimitive.LowerLeft.Y);
    147         //        }
    148         //        Position = new Point(x, y);
    149         //        int w = Size.Width, h = Size.Height;
    150 
    151 
    152145        if (rectangularPrimitive.Size.Width.IsAlmost(0) || rectangularPrimitive.Size.Height.IsAlmost(0)) {
    153146          throw new Exception("Primitive size cannot be zero.");
Note: See TracChangeset for help on using the changeset viewer.