function _calculateOOBAndPinnedLeft(left, bounds, width, pin, pinned, oob) {
  if (left < bounds[0]) {
    if (pin.indexOf('left') >= 0) {
      left = bounds[0];
      pinned.push('left');
    } else {
      oob.push('left');
    }
  }

  if (left + width > bounds[2]) {
    if (pin.indexOf('right') >= 0) {
      left = bounds[2] - width;
      pinned.push('right');
    } else {
      oob.push('right');
    }
  }

  return left;
}
Calculates if out of bounds or pinned in the X direction.

@param {number} left
@param {number[]} bounds Array of bounds of the format [left, top, right, bottom]
@param {number} width
@param pin
@param pinned
@param {string[]} oob
@return {number}
@private