_getCenterPosition(childNodes) {
    let minPos = 1e9;
    let maxPos = -1e9;

    for (let i = 0; i < childNodes.length; i++) {
      let childNode;
      if (childNodes[i].id !== undefined) {
        childNode = childNodes[i];
      } else {
        const childNodeId = childNodes[i];
        childNode = this.body.nodes[childNodeId];
      }

      const position = this.direction.getPosition(childNode);
      minPos = Math.min(minPos, position);
      maxPos = Math.max(maxPos, position);
    }

    return 0.5 * (minPos + maxPos);
  }
Determine the center position of a branch from the passed list of child nodes

This takes into account the positions of all the child nodes.
@param {Array.<Node|vis.Node.id>} childNodes  Array of either child nodes or node id's
@returns {number}
@private