Ignore:
Timestamp:
06/08/17 11:43:26 (3 years ago)
Author:
bburlacu
Message:

#2794: Improve centering and add padding. The padding is handled by the SymbolicExpressionTreeChart which asks the layout engine to layout the tree in the remaining area (minus the padding).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/LayoutEngines/ReingoldTilfordLayoutEngine.cs

    r10565 r15029  
    4040      SecondWalk(layoutRoot, -layoutRoot.Prelim);
    4141      NormalizeCoordinates(layoutNodeMap.Values);
    42       if (height != 0 && width != 0) {
     42      if (width > 0 && height > 0) {
    4343        FitToBounds(width, height, layoutNodeMap.Values);
    4444        Center(width, height, layoutNodeMap.Values);
     
    158158        if (ymax < y) ymax = y;
    159159      }
    160       return new RectangleF(xmin, ymin, xmax + minHorizontalSpacing + NodeWidth, ymax + minVerticalSpacing + NodeHeight);
     160      return new RectangleF(xmin, ymin, xmax + NodeWidth, ymax + NodeHeight);
    161161    }
    162162
Note: See TracChangeset for help on using the changeset viewer.