code: function (childContext, axis) {
          var collapseTarget = childContext.collapseTarget,
              setSizeMethod = 'set' + axis.sizePropCap,
              sizeProp = axis.sizeProp,
              childMarginSize = childContext.getMarginInfo()[sizeProp],
              region, isBegin, flex, pos, size;
  
          if (collapseTarget) { // if (splitter)
              region = collapseTarget.region;
          } else {
              region = childContext.region;
              flex = childContext.flex;
          }
  
          isBegin = region == axis.borderBegin;
  
          if (!isBegin && region != axis.borderEnd) {
              // a north/south region on the horizontal axis or an east/west region on the
              // vertical axis: stretch to fill remaining space:
              childContext[setSizeMethod](axis.end - axis.begin - childMarginSize);
              pos = axis.begin;
          } else {
              if (flex) {
                  size = Math.ceil(axis.flexSpace * (flex / axis.totalFlex));
                  size = childContext[setSizeMethod](size);
              } else if (childContext.percentage) {
                  // Like getProp but without registering a dependency - we calculated the size, we don't depend on it
                  size = childContext.peek(sizeProp);
              } else {
                  size = childContext.getProp(sizeProp);
              }
  
              size += childMarginSize;
  
              if (isBegin) {
                  pos = axis.begin;
                  axis.begin += size;
              } else {
                  axis.end = pos = axis.end - size;
              }
          }
  
          childContext.layoutPos[axis.posProp] = pos;
      }
docs: Performs the calculations for a region on a specified axis.
  @private