_indexArrayToNodes(idArray) {
    const array = [];
    for (let i = 0; i < idArray.length; i++) {
      array.push(this.body.nodes[idArray[i]]);
    }
    return array;
  }
Receives an array with node indices and returns an array with the actual node references.
Used for sorting based on node properties.
@param {Array.<Node.id>} idArray
@returns {Array.<Node>}