code: function (rect, returnNode, returnArray, root) {
      var hitStack = []; // Contains the elements that overlap
  
      if (!rectangle.overlapRectangle(rect, root)) {
        return returnArray;
      }
  
  
      hitStack.push(root.nodes);
  
      while (hitStack.length > 0) {
        var nodes = hitStack.pop();
  
        for (var i = nodes.length - 1; i >= 0; i--) {
          var ltree = nodes[i];
          if (rectangle.overlapRectangle(rect, ltree)) {
            if ('nodes' in ltree) { // Not a Leaf
              hitStack.push(ltree.nodes);
            } else if ('leaf' in ltree) { // A Leaf !!
              if (!returnNode) {
                returnArray.push(ltree.leaf);
              } else {
                returnArray.push(ltree);
              }
            }
          }
        }
      }
  
      return returnArray;
    }
docs: /* non-recursive internal search function
  [ nodes | objects ] = searchSubtree(rectangle, [return node data], [array to fill], root to begin search at)
  @private