title: Getting outer elements in jointJS to expand the paper
body: <p>I want to expand the paper in case of the user is moving an element to the bottom or right border:</p>
  
  <pre><code>var paper = new joint.dia.Paper({
      el: $('#canvas'),
      width: 801,
      height: 496,
      model: graph
  });
  
  rect.on('change:position', function(evt, pos) {
      if (pos.y &gt; 400) { height = pos.y + 96; }
      else { height = 496; }
  
      if (pos.x &gt; 680) { width = pos.x + 121; }
      else { width = 801; }
  
      paper.setDimensions(width, height);
  });
  </code></pre>
  
  <p>This is working for just a single element. But if there is already another element, this doesn't work. </p>
  
  <p>So I need to find the element(s) with the highest x or y value. That means I search for the element which is the most right or bottom of the paper. Then I would put this into another if-clause.</p>
  
  <p>I thought of using <code>paper.findViewsInArea(rect)</code>, but I don't really know how to get the result I need.</p>