anchor.diff:      switch (_direction) {
         case FlexDirection.horizontal:
           size = constraints.constrain(new Size(mainSize, crossSize));
  +        crossSize = size.height;
           break;
         case FlexDirection.vertical:
           size = constraints.constrain(new Size(crossSize, mainSize));
  +        crossSize = size.width;
           break;
       }
   
       // Position elements. For now, center the flex items in the cross direction
  -    double mainDimPosition = leadingSpace;
  +    double childMainPosition = leadingSpace;
       child = firstChild;
       while (child != null) {
  +      double childCrossPosition = crossSize / 2.0 - _getCrossSize(child) / 2.0;
         switch (_direction) {
           case FlexDirection.horizontal:
  -          child.parentData.position = new Point(mainDimPosition, size.height / 2.0 - child.size.height / 2.0);
  -          mainDimPosition += child.size.width;
  -          break;
  -        case FlexDirection.vertical:
  -          child.parentData.position = new Point(size.width / 2.0 - child.size.width / 2.0, mainDimPosition);
  -          mainDimPosition += child.size.height;
  -          break;
  -      }
  -      mainDimPosition += betweenSpace;
  +          child.parentData.position = new Point(childMainPosition, childCrossPosition);
  +          break;
  +        case FlexDirection.vertical:
  +          child.parentData.position = new Point(childCrossPosition, childMainPosition);
  +          break;
  +      }
  +      childMainPosition += _getMainSize(child) + betweenSpace;
         child = child.parentData.nextSibling;
       }
     }
  
positive.code:     return child.parentData.flex != null ? child.parentData.flex : 0;
    }
  
    void performLayout() {
      // Based on http://www.w3.org/TR/css-flexbox-1/ Section 9.7 Resolving Flexible Lengths
      // Steps 1-3. Determine used flex factor, size inflexible items, calculate free space
  
negative.code:             innerConstraints = new BoxConstraints(maxHeight: constraints.maxHeight,
                                                    minWidth: spaceForChild,
                                                    maxWidth: spaceForChild);
              break;
            case FlexDirection.vertical:
              innerConstraints = new BoxConstraints(minHeight: spaceForChild,
                                                    maxHeight: spaceForChild,
                                                    maxWidth: constraints.maxWidth);
              break;
          }
          child.layout(innerConstraints, parentUsesSize: true);
          usedSpace += _getMainSize(child);
          crossSize = math.max(crossSize, _getCrossSize(child));
        }
        child = child.parentData.nextSibling;
      }
  